Interface Client

All Known Implementing Classes:
AnonymousClient, BaseClient, DirectClient, IndirectClient

public interface Client
This interface is the core class of the library. It represents an authentication mechanism to validate user's credentials and retrieve his user profile.
Since:
1.4.0
Author:
Jerome Leleu
  • Method Details

    • getName

      String getName()
      Get the name of the client.
      Returns:
      the name of the client
    • getRedirectionAction

      Optional<RedirectionAction> getRedirectionAction(CallContext ctx)

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

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

      Optional<Credentials> getCredentials(CallContext ctx)
      Get the credentials from the context.
      Parameters:
      ctx - the current context
      Returns:
      the credentials (optional)
    • validateCredentials

      Optional<Credentials> validateCredentials(CallContext ctx, Credentials credentials)
      Validate the credentials.
      Parameters:
      ctx - the current context
      credentials - the authentication credentials
      Returns:
      the credentials (optional)
    • getUserProfile

      Optional<UserProfile> getUserProfile(CallContext ctx, Credentials credentials)
      Get the user profile based on the credentials.
      Parameters:
      ctx - the context
      credentials - the authentication credentials
      Returns:
      the user profile (optional)
    • renewUserProfile

      Optional<UserProfile> renewUserProfile(CallContext ctx, UserProfile profile)
      Renew the user profile.
      Parameters:
      ctx - the current context
      profile - the user profile
      Returns:
      the renewed user profile (optional).
    • processLogout

      HttpAction processLogout(CallContext ctx, Credentials credentials)
      Process the logout.
      Parameters:
      ctx - the current context
      credentials - the logout credentials
      Returns:
      the resulting HTTP action
    • getLogoutAction

      Optional<RedirectionAction> getLogoutAction(CallContext ctx, UserProfile currentProfile, String targetUrl)

      Return the logout action (indirect clients).

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