Class DatabaseSessionValidator
java.lang.Object
rife.database.DbQueryManager
rife.authentication.sessionvalidators.DatabaseSessionValidator
- All Implemented Interfaces:
- Cloneable,- SessionValidator<DatabaseUsers,- DatabaseSessions, - DatabaseRemember> 
public abstract class DatabaseSessionValidator
extends DbQueryManager
implements SessionValidator<DatabaseUsers,DatabaseSessions,DatabaseRemember>  
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected DatabaseUsersprotected DatabaseRememberstatic final intstatic final intprotected DatabaseSessions
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected int_validateSession(Select sessionValidityNoRole, Select sessionValidityNoRoleRestrictAuthData, Select sessionValidityRole, Select sessionValidityRoleRestrictAuthData, ProcessSessionValidity processSessionValidity, String authId, String authData, SessionAttributes attributes) Retrieves the currently usedCredentialsManager.Retrieves the currently usedRememberManager.Retrieves the currently usedSessionManager.booleanisAccessAuthorized(int id) Indicates if the provided validity identifier is considered as valid and that the access to the secured resource is thus authorized.voidsetCredentialsManager(DatabaseUsers credentialsManager) Sets theCredentialsManagerthat will be used.voidsetRememberManager(DatabaseRemember rememberManager) Sets theRememberManagerthat will be used.voidsetSessionManager(DatabaseSessions sessionManager) Sets theSessionManagerthat will be used.Methods inherited from class rife.database.DbQueryManagerclone, executeFetchAll, executeFetchAll, executeFetchAll, executeFetchAll, executeFetchAllBeans, executeFetchAllBeans, executeFetchFirst, executeFetchFirst, executeFetchFirst, executeFetchFirst, executeFetchFirstBean, executeFetchFirstBean, executeGetFirstBoolean, executeGetFirstBoolean, executeGetFirstByte, executeGetFirstByte, executeGetFirstBytes, executeGetFirstBytes, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDouble, executeGetFirstDouble, executeGetFirstFloat, executeGetFirstFloat, executeGetFirstInt, executeGetFirstInt, executeGetFirstLong, executeGetFirstLong, executeGetFirstShort, executeGetFirstShort, executeGetFirstString, executeGetFirstString, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeHasResultRows, executeHasResultRows, executeQuery, executeQuery, executeResultQuery, executeUpdate, executeUpdate, executeUpdate, executeUseFirstAsciiStream, executeUseFirstAsciiStream, executeUseFirstBinaryStream, executeUseFirstBinaryStream, executeUseFirstCharacterStream, executeUseFirstCharacterStream, fetch, fetch, fetch, fetchAll, fetchAll, getConnection, getDatasource, inTransaction, inTransaction, reserveConnectionMethods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface rife.authentication.SessionValidatorvalidateSession
- 
Field Details- 
SESSION_INVALIDpublic static final int SESSION_INVALID- See Also:
 
- 
SESSION_VALIDpublic static final int SESSION_VALID- See Also:
 
- 
credentialsManager_
- 
sessionManager_
- 
rememberManager_
 
- 
- 
Constructor Details- 
DatabaseSessionValidator
 
- 
- 
Method Details- 
setCredentialsManagerDescription copied from interface:SessionValidatorSets theCredentialsManagerthat will be used.- Specified by:
- setCredentialsManagerin interface- SessionValidator<DatabaseUsers,- DatabaseSessions, - DatabaseRemember> 
- Parameters:
- credentialsManager- The new- CredentialsManager.
 
- 
getCredentialsManagerDescription copied from interface:SessionValidatorRetrieves the currently usedCredentialsManager.- Specified by:
- getCredentialsManagerin interface- SessionValidator<DatabaseUsers,- DatabaseSessions, - DatabaseRemember> 
- Returns:
- The current CredentialsManager.
 
- 
setSessionManagerDescription copied from interface:SessionValidatorSets theSessionManagerthat will be used.- Specified by:
- setSessionManagerin interface- SessionValidator<DatabaseUsers,- DatabaseSessions, - DatabaseRemember> 
- Parameters:
- sessionManager- The new- SessionManager.
 
- 
getSessionManagerDescription copied from interface:SessionValidatorRetrieves the currently usedSessionManager.- Specified by:
- getSessionManagerin interface- SessionValidator<DatabaseUsers,- DatabaseSessions, - DatabaseRemember> 
- Returns:
- The current SessionManager.
 
- 
setRememberManagerDescription copied from interface:SessionValidatorSets theRememberManagerthat will be used.- Specified by:
- setRememberManagerin interface- SessionValidator<DatabaseUsers,- DatabaseSessions, - DatabaseRemember> 
- Parameters:
- rememberManager- The new- RememberManager.
 
- 
getRememberManagerDescription copied from interface:SessionValidatorRetrieves the currently usedRememberManager.- Specified by:
- getRememberManagerin interface- SessionValidator<DatabaseUsers,- DatabaseSessions, - DatabaseRemember> 
- Returns:
- The current RememberManager.
 
- 
isAccessAuthorizedpublic boolean isAccessAuthorized(int id) Description copied from interface:SessionValidatorIndicates if the provided validity identifier is considered as valid and that the access to the secured resource is thus authorized.Normally, specific business logic is only required for the situations in which access was prohibited. This method is used to make it possible to provide automatic access to the secured resource. - Specified by:
- isAccessAuthorizedin interface- SessionValidator<DatabaseUsers,- DatabaseSessions, - DatabaseRemember> 
- Parameters:
- id- The numeric identifier that is returned by the- validateSessionmethod.
- Returns:
- trueif access to the secured resource was authorized; or- falseif access was prohibited.
 
- 
_validateSessionprotected int _validateSession(Select sessionValidityNoRole, Select sessionValidityNoRoleRestrictAuthData, Select sessionValidityRole, Select sessionValidityRoleRestrictAuthData, ProcessSessionValidity processSessionValidity, String authId, String authData, SessionAttributes attributes) throws SessionValidatorException - Throws:
- SessionValidatorException
 
 
-