Class BaseClient

    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
      • saveProfileInSession

        protected java.lang.Boolean saveProfileInSession
    • Constructor Detail

      • BaseClient

        public BaseClient()
    • Method Detail

      • retrieveCredentials

        protected java.util.Optional<Credentials> retrieveCredentials​(WebContext context,
                                                                      SessionStore sessionStore)
        Retrieve the credentials.
        Parameters:
        context - the web context
        Returns:
        the credentials
      • getUserProfile

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

        protected final java.util.Optional<UserProfile> retrieveUserProfile​(Credentials credentials,
                                                                            WebContext context,
                                                                            SessionStore sessionStore)
        Retrieve a user profile.
        Parameters:
        credentials - the credentials
        context - the web context
        Returns:
        the user profile
      • renewUserProfile

        public java.util.Optional<UserProfile> renewUserProfile​(UserProfile profile,
                                                                WebContext context,
                                                                SessionStore sessionStore)
        Description copied from interface: Client
        Renew the user profile.
        Specified by:
        renewUserProfile in interface Client
        Parameters:
        profile - the user profile
        context - the current web context
        sessionStore - the session store
        Returns:
        the renewed user profile (optional).
      • setName

        public void setName​(java.lang.String name)
      • getName

        public java.lang.String getName()
        Description copied from interface: Client
        Get the name of the client.
        Specified by:
        getName in interface Client
        Returns:
        the name of the client
      • notifySessionRenewal

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

        public void setAuthorizationGenerators​(java.util.List<AuthorizationGenerator> authorizationGenerators)
      • 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)
      • addAuthorizationGenerators

        public void addAuthorizationGenerators​(java.util.List<AuthorizationGenerator> authorizationGenerators)
      • defaultCredentialsExtractor

        protected void defaultCredentialsExtractor​(CredentialsExtractor credentialsExtractor)
      • defaultAuthenticator

        protected void defaultAuthenticator​(Authenticator authenticator)
      • defaultProfileCreator

        protected void defaultProfileCreator​(ProfileCreator profileCreator)
      • setCredentialsExtractor

        public void setCredentialsExtractor​(CredentialsExtractor credentialsExtractor)
      • setAuthenticator

        public void setAuthenticator​(Authenticator authenticator)
      • setProfileCreator

        public void setProfileCreator​(ProfileCreator profileCreator)
      • getCustomProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getCustomProperties()
      • setCustomProperties

        public void setCustomProperties​(java.util.Map<java.lang.String,​java.lang.Object> customProperties)
      • getProfileFactoryWhenNotAuthenticated

        public ProfileFactory getProfileFactoryWhenNotAuthenticated()
      • setProfileFactoryWhenNotAuthenticated

        public void setProfileFactoryWhenNotAuthenticated​(ProfileFactory profileFactoryWhenNotAuthenticated)
      • setMultiProfile

        public void setMultiProfile​(boolean multiProfile)
      • getSaveProfileInSession

        public java.lang.Boolean getSaveProfileInSession​(WebContext context,
                                                         UserProfile profile)
      • setSaveProfileInSession

        public void setSaveProfileInSession​(boolean saveProfileInSession)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object