org.eclipse.jetty.security.jaspi

## Class JaspiAuthenticator

- java.lang.Object
- - org.eclipse.jetty.security.jaspi.JaspiAuthenticator

- All Implemented Interfaces:
    Authenticator

      public class JaspiAuthenticator
      extends Object
      implements Authenticator

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

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.jetty.security.Authenticator

      `Authenticator.AuthConfiguration, Authenticator.Factory`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JaspiAuthenticator(javax.security.auth.message.config.ServerAuthConfig authConfig, Map authProperties, ServletCallbackHandler callbackHandler, Subject serviceSubject, boolean allowLazyAuthentication, IdentityService identityService)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAuthMethod()`
    `boolean` | `secureResponse(JaspiMessageInfo messageInfo, Authentication validatedUser)`
    `boolean` | `secureResponse(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, boolean mandatory, Authentication.User validatedUser)`
    `void` | `setConfiguration(Authenticator.AuthConfiguration configuration)` Configure the Authenticator
    `Authentication` | `validateRequest(JaspiMessageInfo messageInfo)`
    `Authentication` | `validateRequest(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, boolean mandatory)` Validate a response

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JaspiAuthenticator

          public JaspiAuthenticator(javax.security.auth.message.config.ServerAuthConfig authConfig,
                            Map authProperties,
                            ServletCallbackHandler callbackHandler,
                            Subject serviceSubject,
                            boolean allowLazyAuthentication,
                            IdentityService identityService)

  - ### Method Detail

    - #### setConfiguration

          public void setConfiguration(Authenticator.AuthConfiguration configuration)

      Description copied from interface: `Authenticator`
      Configure the Authenticator
      Specified by:
        `setConfiguration` in interface `Authenticator`

    - #### getAuthMethod

          public String getAuthMethod()

      Specified by:
        `getAuthMethod` in interface `Authenticator`
      Returns:
        The name of the authentication method

    - #### validateRequest

          public Authentication validateRequest(javax.servlet.ServletRequest request,
                                       javax.servlet.ServletResponse response,
                                       boolean mandatory)
                                         throws ServerAuthException

      Description copied from interface: `Authenticator`
      Validate a response
      Specified by:
        `validateRequest` in interface `Authenticator`
      Parameters:
        `request` - The request
        `response` - The response
        `mandatory` - True if authentication is mandatory.
      Returns:
        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.
      Throws:
        `ServerAuthException`

    - #### secureResponse

          public boolean secureResponse(javax.servlet.ServletRequest req,
                               javax.servlet.ServletResponse res,
                               boolean mandatory,
                               Authentication.User validatedUser)
                                 throws ServerAuthException

      Specified by:
        `secureResponse` in interface `Authenticator`
      Returns:
        true if response is secure
      Throws:
        `ServerAuthException`

    - #### validateRequest

          public Authentication validateRequest(JaspiMessageInfo messageInfo)
                                         throws ServerAuthException

      Throws:
        `ServerAuthException`

    - #### secureResponse

          public boolean secureResponse(JaspiMessageInfo messageInfo,
                               Authentication validatedUser)
                                 throws ServerAuthException

      Throws:
        `ServerAuthException`

Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.