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, 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 JDBCLoginService extends AbstractLoginService
JDBC as a source of user authentication and authorization information. Uses one database connection that is lazily initialized. Reconnect on failures.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    JDBCUserPrincipal A UserPrincipal with extra jdbc key info.

    Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

    org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Connection
     
    protected String
     
    protected String
     
    protected String
     
    protected String
     
    protected String
     
    protected String
     
    protected String
     
    protected String
     
    protected String
     
    protected String
     

    Fields inherited from class org.eclipse.jetty.security.AbstractLoginService

    _fullValidate, _identityService, _name

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
     
    JDBCLoginService(String name, IdentityService identityService, String config)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Connect to database with parameters setup by loadConfig()
    protected void
     
    protected void
     
     
     
    loadUserInfo(String username)
     
    void
    setConfig(String config)
    Load JDBC connection configuration from properties file.

    Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle

    addBean, addBean, addEventListener, addManaged, contains, destroy, 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

    dumpSelf

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    isDumpable
  • Field Details

    • _config

      protected String _config
    • _jdbcDriver

      protected String _jdbcDriver
    • _url

      protected String _url
    • _userName

      protected String _userName
    • _password

      protected String _password
    • _userTableKey

      protected String _userTableKey
    • _userTablePasswordField

      protected String _userTablePasswordField
    • _roleTableRoleField

      protected String _roleTableRoleField
    • _userSql

      protected String _userSql
    • _roleSql

      protected String _roleSql
    • _con

      protected Connection _con
  • Constructor Details

    • JDBCLoginService

      public JDBCLoginService()
    • JDBCLoginService

      public JDBCLoginService(String name)
    • JDBCLoginService

      public JDBCLoginService(String name, String config)
    • JDBCLoginService

      public JDBCLoginService(String name, IdentityService identityService, String config)
  • Method Details