Class DirectClient<C extends Credentials>

  • All Implemented Interfaces:
    Client<C>
    Direct Known Subclasses:
    AnonymousClient

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

      • DirectClient

        public DirectClient()
    • Method Detail

      • clientInit

        protected abstract void clientInit()
        Initialize the client.
      • getRedirectionAction

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

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

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

        public final Optional<C> getCredentials​(WebContext context)
        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
        Returns:
        the credentials (optional)
      • getLogoutAction

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

        Return the logout action (indirect clients).

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