Package org.eclipse.jetty.jaas.spi
Class DataSourceLoginModule
java.lang.Object
org.eclipse.jetty.jaas.spi.AbstractLoginModule
org.eclipse.jetty.jaas.spi.AbstractDatabaseLoginModule
org.eclipse.jetty.jaas.spi.DataSourceLoginModule
- All Implemented Interfaces:
LoginModule
DataSourceLoginModule
A LoginModule that uses a DataSource to retrieve user authentication
and authorisation information.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractDatabaseLoginModule
AbstractDatabaseLoginModule.JDBCUserNested classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractLoginModule
AbstractLoginModule.JAASUser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a connection from the DataSourcevoidinitialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) Init LoginModule.Methods inherited from class org.eclipse.jetty.jaas.spi.AbstractDatabaseLoginModule
getRoles, getUserMethods 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
-
DataSourceLoginModule
public DataSourceLoginModule()
-
-
Method Details
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) Init LoginModule.Called once by JAAS after new instance created.
- Specified by:
initializein interfaceLoginModule- Overrides:
initializein classAbstractDatabaseLoginModule- Parameters:
subject- the subjectcallbackHandler- the callback handlersharedState- the shared state mapoptions- the option map- See Also:
-
getConnection
Get a connection from the DataSource- Specified by:
getConnectionin classAbstractDatabaseLoginModule- Returns:
- the connection for the datasource
- Throws:
Exception- if unable to get the connection- See Also:
-