org.eclipse.jetty.security.authentication

## Class DeferredAuthentication

- java.lang.Object
- - org.eclipse.jetty.security.authentication.DeferredAuthentication

- All Implemented Interfaces:
    Authentication, Authentication.Deferred

      public class DeferredAuthentication
      extends Object
      implements Authentication.Deferred

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.jetty.server.Authentication

      `Authentication.Challenge, Authentication.Deferred, Authentication.Failure, Authentication.ResponseSent, Authentication.SendSuccess, Authentication.User, Authentication.Wrapped`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected LoginAuthenticator` | `_authenticator`

    - ### Fields inherited from interface org.eclipse.jetty.server.Authentication

      `NOT_CHECKED, SEND_CONTINUE, SEND_FAILURE, SEND_SUCCESS, UNAUTHENTICATED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeferredAuthentication(LoginAuthenticator authenticator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Authentication` | `authenticate(javax.servlet.ServletRequest request)` Authenticate if possible without sending a challenge.
    `Authentication` | `authenticate(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)` Authenticate and possibly send a challenge.
    `Object` | `getPreviousAssociation()`
    `static boolean` | `isDeferred(javax.servlet.http.HttpServletResponse response)`
    `Authentication` | `login(String username, Object password, javax.servlet.ServletRequest request)` Login with the LOGIN authenticator

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

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

- - ### Field Detail

    - #### _authenticator

          protected final LoginAuthenticator _authenticator

  - ### Constructor Detail

    - #### DeferredAuthentication

          public DeferredAuthentication(LoginAuthenticator authenticator)

  - ### Method Detail

    - #### authenticate

          public Authentication authenticate(javax.servlet.ServletRequest request)

      Description copied from interface: `Authentication.Deferred`
      Authenticate if possible without sending a challenge. This is used to check credentials that have been sent for non-manditory authentication.
      Specified by:
        `authenticate` in interface `Authentication.Deferred`
      Returns:
        The new Authentication state.
      See Also:
        `Authentication.Deferred.authenticate(ServletRequest)`

    - #### authenticate

          public Authentication authenticate(javax.servlet.ServletRequest request,
                                    javax.servlet.ServletResponse response)

      Description copied from interface: `Authentication.Deferred`
      Authenticate and possibly send a challenge. This is used to initiate authentication for previously non-manditory authentication.
      Specified by:
        `authenticate` in interface `Authentication.Deferred`
      Returns:
        The new Authentication state.
      See Also:
        `Authentication.Deferred.authenticate(javax.servlet.ServletRequest, javax.servlet.ServletResponse)`

    - #### login

          public Authentication login(String username,
                             Object password,
                             javax.servlet.ServletRequest request)

      Description copied from interface: `Authentication.Deferred`
      Login with the LOGIN authenticator
      Specified by:
        `login` in interface `Authentication.Deferred`
      Returns:
        The new Authentication state
      See Also:
        `org.eclipse.jetty.server.Authentication.Deferred#login(java.lang.String, java.lang.String)`

    - #### getPreviousAssociation

          public Object getPreviousAssociation()

    - #### isDeferred

          public static boolean isDeferred(javax.servlet.http.HttpServletResponse response)

      Parameters:
        `response` -
      Returns:
        true if this response is from a deferred call to `authenticate(ServletRequest)`

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