Package org.eclipse.jetty.security
Class JDBCLoginService
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.security.AbstractLoginService
org.eclipse.jetty.security.JDBCLoginService
- All Implemented Interfaces:
LoginService,Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
HashMapped User Realm with JDBC as data source.
The
AbstractLoginService.login(String, Object, ServletRequest) method checks the inherited Map for the user. If the user is not
found, it will fetch details from the database and populate the inherited
Map. It then calls the superclass AbstractLoginService.login(String, Object, ServletRequest) method to perform the actual
authentication. Periodically (controlled by configuration parameter),
internal hashes are cleared. Caching can be disabled by setting cache refresh
interval to zero. Uses one database connection that is initialized at
startup. Reconnect on failures.
An example properties file for configuration is in
${jetty.home}/etc/jdbcRealm.properties
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Nested classes/interfaces inherited from class org.eclipse.jetty.security.AbstractLoginService
AbstractLoginService.RolePrincipal, AbstractLoginService.UserPrincipalNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.JDBCLoginService(String name) Deprecated.JDBCLoginService(String name, String config) Deprecated.JDBCLoginService(String name, IdentityService identityService, String config) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.(re)Connect to database with parameters setup by loadConfig()Deprecated.String[]Deprecated.loadUserInfo(String username) Deprecated.voidDeprecated.Load JDBC connection configuration from properties file.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, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
JDBCLoginService
Deprecated.- Throws:
IOException
-
JDBCLoginService
Deprecated.- Throws:
IOException
-
JDBCLoginService
Deprecated.- Throws:
IOException
-
JDBCLoginService
public JDBCLoginService(String name, IdentityService identityService, String config) throws IOException Deprecated.- Throws:
IOException
-
-
Method Details
-
getConfig
Deprecated. -
setConfig
Deprecated.Load JDBC connection configuration from properties file.- Parameters:
config- Filename or url of user properties file.
-
connectDatabase
public void connectDatabase()Deprecated.(re)Connect to database with parameters setup by loadConfig() -
loadUserInfo
Deprecated. -
loadRoleInfo
Deprecated.
-