public class JDBCLoginModule extends AbstractDatabaseLoginModule
JAAS LoginModule to retrieve user information from a database and authenticate the user.
This version uses plain old JDBC connections NOT Datasources.
AbstractDatabaseLoginModule.JDBCUserInfoAbstractLoginModule.JAASUserInfo| Constructor and Description |
|---|
JDBCLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection()
Get a connection from the DriverManager
|
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map<String,?> sharedState,
Map<String,?> options)
Init LoginModule.
|
getRoles, getUserInfoabort, commit, configureCallbacks, getCallbackHandler, getCurrentUser, getSubject, isAuthenticated, isCommitted, isIgnored, login, logout, setAuthenticated, setCallbackHandler, setCommitted, setCurrentUser, setSubjectpublic Connection getConnection() throws Exception
getConnection in class AbstractDatabaseLoginModuleException - if unable to get the connectionAbstractDatabaseLoginModule.getConnection()public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
Called once by JAAS after new instance created.
initialize in interface LoginModuleinitialize in class AbstractDatabaseLoginModulesubject - the subjectcallbackHandler - the callback handlersharedState - the shared state mapoptions - the options mapLoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)Copyright © 1995–2017 Webtide. All rights reserved.