Package org.eclipse.jetty.jaas.spi
Class JDBCLoginModule
java.lang.Object
org.eclipse.jetty.jaas.spi.AbstractLoginModule
org.eclipse.jetty.jaas.spi.AbstractDatabaseLoginModule
org.eclipse.jetty.jaas.spi.JDBCLoginModule
- All Implemented Interfaces:
LoginModule
JAAS LoginModule to retrieve user information from a database and authenticate the user.
Notes
This version uses plain old JDBC connections NOT DataSources.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractDatabaseLoginModule
AbstractDatabaseLoginModule.JDBCUser
Nested classes/interfaces inherited from class org.eclipse.jetty.jaas.spi.AbstractLoginModule
AbstractLoginModule.JAASUser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet a connection from the DriverManagervoid
initialize
(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) Init LoginModule.Methods inherited from class org.eclipse.jetty.jaas.spi.AbstractDatabaseLoginModule
getRoles, getUser
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
-
Constructor Details
-
JDBCLoginModule
public JDBCLoginModule()
-
-
Method Details
-
getConnection
Get a connection from the DriverManager- Specified by:
getConnection
in classAbstractDatabaseLoginModule
- Returns:
- the connection for this datasource
- Throws:
Exception
- if unable to get the connection
-
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:
initialize
in interfaceLoginModule
- Overrides:
initialize
in classAbstractDatabaseLoginModule
- Parameters:
subject
- the subjectcallbackHandler
- the callback handlersharedState
- the shared state mapoptions
- the options map- See Also:
-