Package org.eclipse.jetty.plus.security
Class DataSourceLoginService
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.security.AbstractLoginService
org.eclipse.jetty.plus.security.DataSourceLoginService
- All Implemented Interfaces:
LoginService
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
DataSourceLoginService
Obtain user/password/role information from a database via jndi DataSource.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
Fields inherited from class org.eclipse.jetty.security.AbstractLoginService
_fullValidate, _identityService, _name
-
Constructor Summary
ConstructorDescriptionDataSourceLoginService
(String name) DataSourceLoginService
(String name, IdentityService identityService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
initDb()
Lookup the datasource for the jndiName and formulate the necessary sql query strings based on the configured table and column names.loadRoleInfo
(UserPrincipal user) loadUserInfo
(String username) void
setCreateTables
(boolean createTables) void
setJndiName
(String jndi) void
setRoleTableKey
(String tableKey) void
setRoleTableName
(String tableName) void
setRoleTableRoleField
(String tableRoleField) void
void
setUserRoleTableName
(String roleTableName) void
setUserRoleTableRoleKey
(String roleTableRoleKey) void
setUserRoleTableUserKey
(String roleTableUserKey) void
setUserTableKey
(String tableKey) void
setUserTableName
(String name) void
setUserTablePasswordField
(String tablePasswordField) void
setUserTableUserField
(String tableUserField) Methods inherited from class org.eclipse.jetty.security.AbstractLoginService
getIdentityService, getName, isFullValidate, login, logout, setFullValidate, setIdentityService, setName, toString, validate
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListeners
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
DataSourceLoginService
public DataSourceLoginService() -
DataSourceLoginService
-
DataSourceLoginService
-
-
Method Details
-
setJndiName
-
getJndiName
-
setServer
-
getServer
-
setCreateTables
public void setCreateTables(boolean createTables) -
getCreateTables
public boolean getCreateTables() -
setUserTableName
-
getUserTableName
-
getUserTableKey
-
setUserTableKey
-
getUserTableUserField
-
setUserTableUserField
-
getUserTablePasswordField
-
setUserTablePasswordField
-
getRoleTableName
-
setRoleTableName
-
getRoleTableKey
-
setRoleTableKey
-
getRoleTableRoleField
-
setRoleTableRoleField
-
getUserRoleTableName
-
setUserRoleTableName
-
getUserRoleTableUserKey
-
setUserRoleTableUserKey
-
getUserRoleTableRoleKey
-
setUserRoleTableRoleKey
-
loadUserInfo
- Specified by:
loadUserInfo
in classAbstractLoginService
-
loadRoleInfo
- Specified by:
loadRoleInfo
in classAbstractLoginService
-
initDb
Lookup the datasource for the jndiName and formulate the necessary sql query strings based on the configured table and column names.- Throws:
NamingException
- if unable to init jndiSQLException
- if unable to init database
-