Package org.eclipse.jetty.jaas.spi
Class AbstractDatabaseLoginModule
java.lang.Object
org.eclipse.jetty.jaas.spi.AbstractLoginModule
org.eclipse.jetty.jaas.spi.AbstractDatabaseLoginModule
- All Implemented Interfaces:
LoginModule
- Direct Known Subclasses:
DataSourceLoginModule,JDBCLoginModule
AbstractDatabaseLoginModule
Abstract base class for LoginModules that interact with a
database to retrieve authentication and authorization information.
Used by the JDBCLoginModule and DataSourceLoginModule.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractLoginModule
AbstractLoginModule.JAASUser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ConnectionLoad info from databasevoidinitialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) Methods inherited from class org.eclipse.jetty.jaas.spi.AbstractLoginModule
abort, commit, configureCallbacks, getCallbackHandler, getCurrentUser, getSubject, isAuthenticated, isCommitted, isIgnored, login, logout, setAuthenticated, setCallbackHandler, setCommitted, setCurrentUser, setSubject
-
Constructor Details
-
AbstractDatabaseLoginModule
public AbstractDatabaseLoginModule()
-
-
Method Details
-
getConnection
- Returns:
- a java.sql.Connection from the database
- Throws:
Exception- if unable to get the connection
-
getUser
Load info from database- Specified by:
getUserin classAbstractLoginModule- Parameters:
userName- user info to load- Throws:
Exception- if unable to get the user info
-
getRoles
- Throws:
Exception
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) - Specified by:
initializein interfaceLoginModule- Overrides:
initializein classAbstractLoginModule- Parameters:
subject- the subjectcallbackHandler- the callback handlersharedState- the shared state mapoptions- the option map- See Also:
-