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 java.lang.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 Authenticator` | `_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(Authenticator authenticator)`
    `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.
    `IdentityService` | `getIdentityService()` Get the identityService.
    `LoginService` | `getLoginService()`
    `java.lang.Object` | `getPreviousAssociation()`
    `static boolean` | `isDeferred(javax.servlet.http.HttpServletResponse response)`
    `Authentication` | `login(java.lang.String username, java.lang.String password)` Login with the LOGIN authenticator
    `void` | `setIdentityService(IdentityService identityService)` Set the identityService.
    `void` | `setLoginService(LoginService loginService)`

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

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

- - ### Field Detail

    - #### _authenticator

          protected final Authenticator _authenticator

  - ### Constructor Detail

    - #### DeferredAuthentication

          public DeferredAuthentication(Authenticator authenticator)

    - #### DeferredAuthentication

          public DeferredAuthentication(LoginAuthenticator authenticator)

  - ### Method Detail

    - #### getIdentityService

          public IdentityService getIdentityService()

      Get the identityService.
      Returns:
        the identityService

    - #### setIdentityService

          public void setIdentityService(IdentityService identityService)

      Set the identityService.
      Parameters:
        `identityService` - the identityService to set

    - #### getLoginService

          public LoginService getLoginService()

    - #### setLoginService

          public void setLoginService(LoginService loginService)

    - #### 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(java.lang.String username,
                             java.lang.String password)

      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:
        `Authentication.Deferred.login(java.lang.String, java.lang.String)`

    - #### getPreviousAssociation

          public java.lang.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 © 2013 FuseSource, Corp.. All Rights Reserved.