Class DirectClient

All Implemented Interfaces:
Client
Direct Known Subclasses:
AnonymousClient

public abstract class DirectClient extends BaseClient
Direct client: credentials are passed and authentication occurs for every HTTP request.
Since:
1.9.0
Author:
Jerome Leleu
  • Constructor Details

    • DirectClient

      public DirectClient()
  • Method Details

    • beforeInternalInit

      protected void beforeInternalInit(boolean forceReinit)
      Overrides:
      beforeInternalInit in class InitializableObject
    • afterInternalInit

      protected final void afterInternalInit(boolean forceReinit)
      Overrides:
      afterInternalInit in class InitializableObject
    • getRedirectionAction

      public final Optional<RedirectionAction> getRedirectionAction(WebContext context, SessionStore sessionStore)
      Description copied from interface: Client

      Return the redirection action to the authentication provider (indirect clients).

      Parameters:
      context - the current web context
      sessionStore - the session store
      Returns:
      the redirection to perform (optional)
    • getCredentials

      public final Optional<Credentials> getCredentials(WebContext context, SessionStore sessionStore)
      Description copied from interface: Client

      Get the credentials from the web context. If no validation was made remotely (direct client), credentials must be validated at this step.

      Parameters:
      context - the current web context
      sessionStore - the session store
      Returns:
      the credentials (optional)
    • getLogoutAction

      public final Optional<RedirectionAction> getLogoutAction(WebContext context, SessionStore sessionStore, UserProfile currentProfile, String targetUrl)
      Description copied from interface: Client

      Return the logout action (indirect clients).

      Parameters:
      context - the current web context
      sessionStore - the session store
      currentProfile - the currentProfile
      targetUrl - the target url after logout
      Returns:
      the redirection to perform (optional)
    • toString

      public String toString()
      Overrides:
      toString in class BaseClient