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:
javax.security.auth.spi.LoginModule
public class DataSourceLoginModule extends AbstractDatabaseLoginModule
DataSourceLoginModule A LoginModule that uses a DataSource to retrieve user authentication and authorisation information.- See Also:
JDBCLoginModule
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractDatabaseLoginModule
AbstractDatabaseLoginModule.JDBCUserInfo
-
Nested classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractLoginModule
AbstractLoginModule.JAASUserInfo
-
-
Constructor Summary
Constructors Constructor Description DataSourceLoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.Connection
getConnection()
Get a connection from the DataSourcevoid
initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,?> sharedState, java.util.Map<java.lang.String,?> options)
Init LoginModule.-
Methods inherited from class org.eclipse.jetty.jaas.spi.AbstractDatabaseLoginModule
getRoles, getUserInfo
-
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
-
-
-
-
Method Detail
-
initialize
public void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,?> sharedState, java.util.Map<java.lang.String,?> options)
Init LoginModule.Called once by JAAS after new instance created.
- Specified by:
initialize
in interfacejavax.security.auth.spi.LoginModule
- Overrides:
initialize
in classAbstractDatabaseLoginModule
- Parameters:
subject
- the subjectcallbackHandler
- the callback handlersharedState
- the shared state mapoptions
- the option map- See Also:
LoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
-
getConnection
public java.sql.Connection getConnection() throws java.lang.Exception
Get a connection from the DataSource- Specified by:
getConnection
in classAbstractDatabaseLoginModule
- Returns:
- the connection for the datasource
- Throws:
java.lang.Exception
- if unable to get the connection- See Also:
AbstractDatabaseLoginModule.getConnection()
-
-