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:
javax.security.auth.spi.LoginModule
- Direct Known Subclasses:
DataSourceLoginModule
,JDBCLoginModule
public abstract class AbstractDatabaseLoginModule extends AbstractLoginModule
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 Modifier and Type Class Description class
AbstractDatabaseLoginModule.JDBCUserInfo
-
Nested classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractLoginModule
AbstractLoginModule.JAASUserInfo
-
-
Constructor Summary
Constructors Constructor Description AbstractDatabaseLoginModule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.sql.Connection
getConnection()
java.util.List<java.lang.String>
getRoles(java.lang.String userName)
UserInfo
getUserInfo(java.lang.String userName)
Load info from databasevoid
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)
-
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
-
getConnection
public abstract java.sql.Connection getConnection() throws java.lang.Exception
- Returns:
- a java.sql.Connection from the database
- Throws:
java.lang.Exception
- if unable to get the connection
-
getUserInfo
public UserInfo getUserInfo(java.lang.String userName) throws java.lang.Exception
Load info from database- Specified by:
getUserInfo
in classAbstractLoginModule
- Parameters:
userName
- user info to load- Throws:
java.lang.Exception
- if unable to get the user info
-
getRoles
public java.util.List<java.lang.String> getRoles(java.lang.String userName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
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)
- Specified by:
initialize
in interfacejavax.security.auth.spi.LoginModule
- Overrides:
initialize
in classAbstractLoginModule
- 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)
-
-