org.eclipse.jetty.security.authentication
类 FormAuthenticator

java.lang.Object
  继承者 org.eclipse.jetty.security.authentication.LoginAuthenticator
      继承者 org.eclipse.jetty.security.authentication.FormAuthenticator
所有已实现的接口:
Authenticator

public class FormAuthenticator
extends LoginAuthenticator

FORM Authenticator.

This authenticator implements form authentication will use dispatchers to the login page if the __FORM_DISPATCH init parameter is set to true. Otherwise it will redirect.

The form authenticator redirects unauthenticated requests to a log page which should use a form to gather username/password from the user and send them to the /j_security_check URI within the context. FormAuthentication uses SessionAuthentication to wrap Authentication results so that they are associated with the session.


嵌套类摘要
static class FormAuthenticator.FormAuthentication
          This Authentication represents a just completed Form authentication.
protected static class FormAuthenticator.FormRequest
           
protected static class FormAuthenticator.FormResponse
           
 
从接口 org.eclipse.jetty.security.Authenticator 继承的嵌套类/接口
Authenticator.AuthConfiguration, Authenticator.Factory
 
字段摘要
static String __FORM_DISPATCH
           
static String __FORM_ERROR_PAGE
           
static String __FORM_LOGIN_PAGE
           
static String __J_PASSWORD
           
static String __J_POST
           
static String __J_SECURITY_CHECK
           
static String __J_URI
           
static String __J_USERNAME
           
 
从类 org.eclipse.jetty.security.authentication.LoginAuthenticator 继承的字段
_identityService, _loginService
 
构造方法摘要
FormAuthenticator()
           
FormAuthenticator(String login, String error, boolean dispatch)
           
 
方法摘要
 boolean getAlwaysSaveUri()
           
 String getAuthMethod()
           
 boolean isJSecurityCheck(String uri)
           
 boolean isLoginOrErrorPage(String pathInContext)
           
 UserIdentity login(String username, Object password, ServletRequest request)
           
 boolean secureResponse(ServletRequest req, ServletResponse res, boolean mandatory, Authentication.User validatedUser)
           
 void setAlwaysSaveUri(boolean alwaysSave)
          If true, uris that cause a redirect to a login page will always be remembered.
 void setConfiguration(Authenticator.AuthConfiguration configuration)
          Configure the Authenticator
 Authentication validateRequest(ServletRequest req, ServletResponse res, boolean mandatory)
          Validate a response
 
从类 org.eclipse.jetty.security.authentication.LoginAuthenticator 继承的方法
getLoginService, renewSession
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

__FORM_LOGIN_PAGE

public static final String __FORM_LOGIN_PAGE
另请参见:
常量字段值

__FORM_ERROR_PAGE

public static final String __FORM_ERROR_PAGE
另请参见:
常量字段值

__FORM_DISPATCH

public static final String __FORM_DISPATCH
另请参见:
常量字段值

__J_URI

public static final String __J_URI
另请参见:
常量字段值

__J_POST

public static final String __J_POST
另请参见:
常量字段值

__J_SECURITY_CHECK

public static final String __J_SECURITY_CHECK
另请参见:
常量字段值

__J_USERNAME

public static final String __J_USERNAME
另请参见:
常量字段值

__J_PASSWORD

public static final String __J_PASSWORD
另请参见:
常量字段值
构造方法详细信息

FormAuthenticator

public FormAuthenticator()

FormAuthenticator

public FormAuthenticator(String login,
                         String error,
                         boolean dispatch)
方法详细信息

setAlwaysSaveUri

public void setAlwaysSaveUri(boolean alwaysSave)
If true, uris that cause a redirect to a login page will always be remembered. If false, only the first uri that leads to a login page redirect is remembered. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=379909

参数:
alwaysSave -

getAlwaysSaveUri

public boolean getAlwaysSaveUri()

setConfiguration

public void setConfiguration(Authenticator.AuthConfiguration configuration)
从接口 Authenticator 复制的描述
Configure the Authenticator

指定者:
接口 Authenticator 中的 setConfiguration
覆盖:
LoginAuthenticator 中的 setConfiguration
另请参见:
LoginAuthenticator.setConfiguration(org.eclipse.jetty.security.Authenticator.AuthConfiguration)

getAuthMethod

public String getAuthMethod()
返回:
The name of the authentication method

login

public UserIdentity login(String username,
                          Object password,
                          ServletRequest request)
覆盖:
LoginAuthenticator 中的 login

validateRequest

public Authentication validateRequest(ServletRequest req,
                                      ServletResponse res,
                                      boolean mandatory)
                               throws ServerAuthException
从接口 Authenticator 复制的描述
Validate a response

参数:
req - The request
res - The response
mandatory - True if authentication is mandatory.
返回:
An Authentication. If Authentication is successful, this will be a Authentication.User. If a response has been sent by the Authenticator (which can be done for both successful and unsuccessful authentications), then the result will implement Authentication.ResponseSent. If Authentication is not manditory, then a Authentication.Deferred may be returned.
抛出:
ServerAuthException

isJSecurityCheck

public boolean isJSecurityCheck(String uri)

isLoginOrErrorPage

public boolean isLoginOrErrorPage(String pathInContext)

secureResponse

public boolean secureResponse(ServletRequest req,
                              ServletResponse res,
                              boolean mandatory,
                              Authentication.User validatedUser)
                       throws ServerAuthException
返回:
true if response is secure
抛出:
ServerAuthException


Copyright © 2013. All Rights Reserved.