Top Description Fields Constructors Methods
org.eclipse.jetty.security.jaas.spi

public Class DataSourceLoginModule

extends AbstractDatabaseLoginModule
Class Inheritance
Imports
java.sql.Connection, java.util.Map, javax.naming.InitialContext, .NamingException, javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, javax.sql.DataSource

DataSourceLoginModule A LoginModule that uses a DataSource to retrieve user authentication and authorisation information.
See Also
JDBCLoginModule

Field Summary

Modifier and TypeField and Description
private DataSource
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Connection

Returns:

the connection for the datasource
getConnection
()

Implements abstract org.eclipse.jetty.security.jaas.spi.AbstractDatabaseLoginModule.getConnection.

Get a connection from the DataSource
public void
initialize(Subject
the subject
subject
,
CallbackHandler
the callback handler
callbackHandler
,
Map<String, ?>
the shared state map
sharedState
,
Map<String, ?>
the option map
options
)

Overrides org.eclipse.jetty.security.jaas.spi.AbstractDatabaseLoginModule.initialize.

Implements javax.security.auth.spi.LoginModule.initialize.

Init LoginModule.
Inherited from org.eclipse.jetty.security.jaas.spi.AbstractDatabaseLoginModule:
getRolesgetUser

Field Detail

dataSourceback to summary
private DataSource dataSource
dbJNDINameback to summary
private String dbJNDIName

Constructor Detail

DataSourceLoginModuleback to summary
public DataSourceLoginModule()

Method Detail

getConnectionback to summary
public Connection getConnection() throws Exception

Implements abstract org.eclipse.jetty.security.jaas.spi.AbstractDatabaseLoginModule.getConnection.

Get a connection from the DataSource

Returns:Connection

the connection for the datasource

Annotations
@Override
Exceptions
Exception:
if unable to get the connection
See Also
AbstractDatabaseLoginModule#getConnection()
initializeback to summary
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options)

Overrides org.eclipse.jetty.security.jaas.spi.AbstractDatabaseLoginModule.initialize.

Implements javax.security.auth.spi.LoginModule.initialize.

Init LoginModule.

Called once by JAAS after new instance created.

Parameters
subject:Subject

the subject

callbackHandler:CallbackHandler

the callback handler

sharedState:Map<String, ?>

the shared state map

options:Map<String, ?>

the option map

Annotations
@Override