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
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 classAbstractDatabaseLoginModule.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 ConnectiongetConnection()List<String>getRoles(String userName)UserInfogetUserInfo(String userName)Load 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
-
-
-
-
Method Detail
-
getConnection
public abstract Connection getConnection() throws Exception
- Returns:
- a java.sql.Connection from the database
- Throws:
Exception- if unable to get the connection
-
getUserInfo
public UserInfo getUserInfo(String userName) throws Exception
Load info from database- Specified by:
getUserInfoin classAbstractLoginModule- Parameters:
userName- user info to load- Throws:
Exception- if unable to get the user info
-
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:
LoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
-
-