org.eclipse.jetty.security
接口 Authenticator

所有已知实现类:
BasicAuthenticator, ClientCertAuthenticator, DigestAuthenticator, FormAuthenticator, JaspiAuthenticator, LoginAuthenticator, SpnegoAuthenticator

public interface Authenticator

Authenticator Interface

An Authenticator is responsible for checking requests and sending response challenges in order to authenticate a request. Various types of Authentication are returned in order to signal the next step in authentication.

版本:
$Rev: 4793 $ $Date: 2009-03-19 00:00:01 +0100 (Thu, 19 Mar 2009) $

嵌套类摘要
static interface Authenticator.AuthConfiguration
          Authenticator Configuration
static interface Authenticator.Factory
          Authenticator Factory
 
方法摘要
 String getAuthMethod()
           
 boolean secureResponse(ServletRequest request, ServletResponse response, boolean mandatory, Authentication.User validatedUser)
           
 void setConfiguration(Authenticator.AuthConfiguration configuration)
          Configure the Authenticator
 Authentication validateRequest(ServletRequest request, ServletResponse response, boolean mandatory)
          Validate a response
 

方法详细信息

setConfiguration

void setConfiguration(Authenticator.AuthConfiguration configuration)
Configure the Authenticator

参数:
configuration -

getAuthMethod

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

validateRequest

Authentication validateRequest(ServletRequest request,
                               ServletResponse response,
                               boolean mandatory)
                               throws ServerAuthException
Validate a response

参数:
request - The request
response - 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

secureResponse

boolean secureResponse(ServletRequest request,
                       ServletResponse response,
                       boolean mandatory,
                       Authentication.User validatedUser)
                       throws ServerAuthException
参数:
request -
response -
mandatory -
validatedUser -
返回:
true if response is secure
抛出:
ServerAuthException


Copyright © 2013. All Rights Reserved.