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:
org.eclipse.jetty.security.LoginService,org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.Dumpable.DumpableContainer,org.eclipse.jetty.util.component.LifeCycle
public class DataSourceLoginService
extends org.eclipse.jetty.security.AbstractLoginService
DataSourceLoginService
Obtain user/password/role information from a database via jndi DataSource.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.Dumpable.DumpAppendableNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
Fields inherited from class org.eclipse.jetty.security.AbstractLoginService
_fullValidate, _identityService, _nameFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.component.Dumpable
LEGEND -
Constructor Summary
ConstructorsConstructorDescriptionDataSourceLoginService(String name) DataSourceLoginService(String name, org.eclipse.jetty.security.IdentityService identityService) -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.eclipse.jetty.server.ServervoidinitDb()Lookup the datasource for the jndiName and formulate the necessary sql query strings based on the configured table and column names.List<org.eclipse.jetty.security.RolePrincipal> loadRoleInfo(org.eclipse.jetty.security.UserPrincipal user) org.eclipse.jetty.security.UserPrincipalloadUserInfo(String username) voidsetCreateTables(boolean createTables) voidsetJndiName(String jndi) voidsetRoleTableKey(String tableKey) voidsetRoleTableName(String tableName) voidsetRoleTableRoleField(String tableRoleField) voidsetServer(org.eclipse.jetty.server.Server server) voidsetUserRoleTableName(String roleTableName) voidsetUserRoleTableRoleKey(String roleTableRoleKey) voidsetUserRoleTableUserKey(String roleTableUserKey) voidsetUserTableKey(String tableKey) voidsetUserTableName(String name) voidsetUserTablePasswordField(String tablePasswordField) voidsetUserTableUserField(String tableUserField) Methods inherited from class org.eclipse.jetty.security.AbstractLoginService
getIdentityService, getName, isFullValidate, login, logout, setFullValidate, setIdentityService, setName, toString, validateMethods 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, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListenersMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dumpSelfMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpableMethods inherited from interface org.eclipse.jetty.security.LoginService
getUserIdentity
-
Constructor Details
-
DataSourceLoginService
public DataSourceLoginService() -
DataSourceLoginService
-
DataSourceLoginService
public DataSourceLoginService(String name, org.eclipse.jetty.security.IdentityService identityService)
-
-
Method Details
-
setJndiName
-
getJndiName
-
setServer
public void setServer(org.eclipse.jetty.server.Server server) -
getServer
public org.eclipse.jetty.server.Server 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:
loadUserInfoin classorg.eclipse.jetty.security.AbstractLoginService
-
loadRoleInfo
public List<org.eclipse.jetty.security.RolePrincipal> loadRoleInfo(org.eclipse.jetty.security.UserPrincipal user) - Specified by:
loadRoleInfoin classorg.eclipse.jetty.security.AbstractLoginService
-
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
-