Top Description Fields Constructors Methods
org.hsqldb.auth

public Class HsqldbSlaveAuthBean

extends Object
implements AuthFunctionBean
Class Inheritance
All Implemented Interfaces
org.hsqldb.auth.AuthFunctionBean
Imports
java.sql.Connection, .DriverManager, .SQLException, java.util.Set, org.hsqldb.lib.FrameworkLogger

Delegates authentication decisions, and optionally determination of user roles and schema, to a different HyperSQL catalog, which may be in the same JVM or remote. For now, at least, this class uses DriverManager to make the ephemeral database connections.
Author
Blaine Simpson (blaine dot simpson at admc dot com)
Since
2.7.3
See Also
AuthFunctionBean

Field Summary

Modifier and TypeField and Description
private boolean
protected boolean
private static FrameworkLogger
private String
private String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String[]
authenticate(String userName, String password)

Implements org.hsqldb.auth.AuthFunctionBean.authenticate.

Return a list of authorized roles or null to indicate that the implementation does not intend to produce a specific role list but only to indicate whether to allow access or not.

public void
init()

public void
setDelegateRolesSchema(boolean
boolean
doDelegateRolesSchema
)

Defaults to true.

public void
setMasterJdbcUrl(String masterJdbcUrl)

public void
setValidationPassword(String
String
validationPassword
)

Use this method and setValidationUser if you want access to the master database to be verified upon instance initialization.

public void
setValidationUser(String
String
validationUser
)

Use this method and setValidationPassword if you want access to the master database to be verified upon instance initialization.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateRolesSchemaback to summary
private boolean delegateRolesSchema
initializedback to summary
protected boolean initialized
loggerback to summary
private static FrameworkLogger logger
masterJdbcUrlback to summary
private String masterJdbcUrl
validationPasswordback to summary
private String validationPassword
validationUserback to summary
private String validationUser

Constructor Detail

HsqldbSlaveAuthBeanback to summary
public HsqldbSlaveAuthBean()

Method Detail

authenticateback to summary
public String[] authenticate(String userName, String password) throws DenyException

Implements org.hsqldb.auth.AuthFunctionBean.authenticate.

Doc from org.hsqldb.auth.AuthFunctionBean.authenticate.

Return a list of authorized roles or null to indicate that the implementation does not intend to produce a specific role list but only to indicate whether to allow access or not. A return value of String[0] is different from returning null, and means that the user should not be granted any roles.

initback to summary
public void init() throws SQLException
Exceptions
SQLException:
if properties 'validationUser' and 'validationPassword' have been set, but we fail to connect to the master database.
IllegalStateException:
if any required setting has not been set.
setDelegateRolesSchemaback to summary
public void setDelegateRolesSchema(boolean doDelegateRolesSchema)

Defaults to true. Whether roles and initial schema for the new session will be determined by what they are for this user in the master database.

Parameters
doDelegateRolesSchema:boolean

boolean

setMasterJdbcUrlback to summary
public void setMasterJdbcUrl(String masterJdbcUrl)
setValidationPasswordback to summary
public void setValidationPassword(String validationPassword)

Use this method and setValidationUser if you want access to the master database to be verified upon instance initialization.

Parameters
validationPassword:String

String

setValidationUserback to summary
public void setValidationUser(String validationUser)

Use this method and setValidationPassword if you want access to the master database to be verified upon instance initialization.

Parameters
validationUser:String

String