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 classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractLoginModule
AbstractLoginModule.JAASUser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Connection
Load info from databasevoid
initialize
(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:
getUser
in 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:
initialize
in interfaceLoginModule
- Overrides:
initialize
in classAbstractLoginModule
- Parameters:
subject
- the subjectcallbackHandler
- the callback handlersharedState
- the shared state mapoptions
- the option map- See Also:
-