org.eclipse.jetty.plus.jaas
类 JAASLoginService

java.lang.Object
  继承者 org.eclipse.jetty.util.component.AbstractLifeCycle
      继承者 org.eclipse.jetty.plus.jaas.JAASLoginService
所有已实现的接口:
LoginService, LifeCycle

public class JAASLoginService
extends AbstractLifeCycle
implements LoginService

JAASLoginService


嵌套类摘要
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的嵌套类/接口
AbstractLifeCycle.AbstractLifeCycleListener
 
从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口
LifeCycle.Listener
 
字段摘要
protected  String _callbackHandlerClass
           
protected  JAASUserPrincipal _defaultUser
           
protected  IdentityService _identityService
           
protected  String _loginModuleName
           
protected  String _realmName
           
protected  String[] _roleClassNames
           
static String DEFAULT_ROLE_CLASS_NAME
           
static String[] DEFAULT_ROLE_CLASS_NAMES
           
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的字段
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
 
构造方法摘要
JAASLoginService()
          Constructor.
JAASLoginService(String name)
          Constructor.
 
方法摘要
protected  void doStart()
           
 IdentityService getIdentityService()
          Get the identityService.
 String getName()
          Get the name of the realm.
 String[] getRoleClassNames()
           
 UserIdentity login(String username, Object credentials)
          Login a user.
 void logout(UserIdentity user)
           
 void setCallbackHandlerClass(String classname)
           
 void setIdentityService(IdentityService identityService)
          Set the identityService.
 void setLoginModuleName(String name)
          Set the name to use to index into the config file of LoginModules.
 void setName(String name)
          Set the name of the realm
 void setRoleClassNames(String[] classnames)
           
 boolean validate(UserIdentity user)
          Validate a user identity.
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的方法
addLifeCycleListener, doStop, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

DEFAULT_ROLE_CLASS_NAME

public static String DEFAULT_ROLE_CLASS_NAME

DEFAULT_ROLE_CLASS_NAMES

public static String[] DEFAULT_ROLE_CLASS_NAMES

_roleClassNames

protected String[] _roleClassNames

_callbackHandlerClass

protected String _callbackHandlerClass

_realmName

protected String _realmName

_loginModuleName

protected String _loginModuleName

_defaultUser

protected JAASUserPrincipal _defaultUser

_identityService

protected IdentityService _identityService
构造方法详细信息

JAASLoginService

public JAASLoginService()
Constructor.


JAASLoginService

public JAASLoginService(String name)
Constructor.

参数:
name - the name of the realm
方法详细信息

getName

public String getName()
Get the name of the realm.

指定者:
接口 LoginService 中的 getName
返回:
name or null if not set.

setName

public void setName(String name)
Set the name of the realm

参数:
name - a String value

getIdentityService

public IdentityService getIdentityService()
Get the identityService.

指定者:
接口 LoginService 中的 getIdentityService
返回:
the identityService

setIdentityService

public void setIdentityService(IdentityService identityService)
Set the identityService.

指定者:
接口 LoginService 中的 setIdentityService
参数:
identityService - the identityService to set

setLoginModuleName

public void setLoginModuleName(String name)
Set the name to use to index into the config file of LoginModules.

参数:
name - a String value

setCallbackHandlerClass

public void setCallbackHandlerClass(String classname)

setRoleClassNames

public void setRoleClassNames(String[] classnames)

getRoleClassNames

public String[] getRoleClassNames()

doStart

protected void doStart()
                throws Exception
覆盖:
AbstractLifeCycle 中的 doStart
抛出:
Exception
另请参见:
AbstractLifeCycle.doStart()

login

public UserIdentity login(String username,
                          Object credentials)
从接口 LoginService 复制的描述
Login a user.

指定者:
接口 LoginService 中的 login
参数:
username - The user name
credentials - The users credentials
返回:
A UserIdentity if the credentials matched, otherwise null

validate

public boolean validate(UserIdentity user)
从接口 LoginService 复制的描述
Validate a user identity. Validate that a UserIdentity previously created by a call to LoginService.login(String, Object) is still valid.

指定者:
接口 LoginService 中的 validate
参数:
user - The user to validate
返回:
true if authentication has not been revoked for the user.

logout

public void logout(UserIdentity user)
指定者:
接口 LoginService 中的 logout


Copyright © 2013. All Rights Reserved.