Class BaseClient<C extends Credentials>

    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
    • Constructor Detail

      • BaseClient

        public BaseClient()
    • Method Detail

      • retrieveCredentials

        protected Optional<C> retrieveCredentials​(WebContext context)
        Retrieve the credentials.
        Parameters:
        context - the web context
        Returns:
        the credentials
      • getUserProfile

        public final Optional<UserProfile> getUserProfile​(C credentials,
                                                          WebContext context)
        Description copied from interface: Client
        Get the user profile based on the provided credentials.
        Specified by:
        getUserProfile in interface Client<C extends Credentials>
        Parameters:
        credentials - credentials
        context - web context
        Returns:
        the user profile (optional)
      • retrieveUserProfile

        protected final Optional<UserProfile> retrieveUserProfile​(C credentials,
                                                                  WebContext context)
        Retrieve a user profile.
        Parameters:
        credentials - the credentials
        context - the web context
        Returns:
        the user profile
      • setName

        public void setName​(String name)
      • getName

        public String getName()
        Description copied from interface: Client
        Get the name of the client.
        Specified by:
        getName in interface Client<C extends Credentials>
        Returns:
        the name of the client
      • notifySessionRenewal

        public void notifySessionRenewal​(String oldSessionId,
                                         WebContext context)
        Notify of the web session renewal.
        Parameters:
        oldSessionId - the old session identifier
        context - the web context
      • setAuthorizationGenerators

        public void setAuthorizationGenerators​(AuthorizationGenerator... authorizationGenerators)
      • setAuthorizationGenerator

        public void setAuthorizationGenerator​(AuthorizationGenerator authorizationGenerator)
        Add an authorization generator.
        Parameters:
        authorizationGenerator - an authorizations generator
      • addAuthorizationGenerator

        public void addAuthorizationGenerator​(AuthorizationGenerator authorizationGenerator)
      • defaultCredentialsExtractor

        protected void defaultCredentialsExtractor​(CredentialsExtractor<C> credentialsExtractor)
      • defaultAuthenticator

        protected void defaultAuthenticator​(Authenticator<C> authenticator)
      • defaultProfileCreator

        protected void defaultProfileCreator​(ProfileCreator<C> profileCreator)
      • setCredentialsExtractor

        public void setCredentialsExtractor​(CredentialsExtractor<C> credentialsExtractor)
      • setAuthenticator

        public void setAuthenticator​(Authenticator<C> authenticator)
      • setProfileCreator

        public void setProfileCreator​(ProfileCreator<C> profileCreator)
      • setCustomProperties

        public void setCustomProperties​(Map<String,​Object> customProperties)