Class SsoManager

java.lang.Object
org.codelibs.fess.sso.SsoManager

public class SsoManager extends Object
Manager class for coordinating SSO (Single Sign-On) authentication operations. This class serves as the central coordinator for SSO authentication in Fess. It manages registered SSO authenticators, determines when SSO is available, and delegates authentication operations to the appropriate SSO provider based on the current configuration.
  • Field Details

    • authenticatorList

      protected final List<SsoAuthenticator> authenticatorList
      List of registered SSO authenticators.
  • Constructor Details

    • SsoManager

      public SsoManager()
      Default constructor for creating a new SsoManager instance.
  • Method Details

    • available

      public boolean available()
      Checks whether SSO authentication is available and configured.
      Returns:
      true if SSO is configured and available, false otherwise
    • getLoginCredential

      public org.lastaflute.web.login.credential.LoginCredential getLoginCredential()
      Attempts to obtain login credentials using the configured SSO authenticator.
      Returns:
      The login credential from SSO authentication, or null if SSO is not available or no credential could be obtained
    • getResponse

      public org.lastaflute.web.response.ActionResponse getResponse(SsoResponseType responseType)
      Gets the appropriate response for the specified SSO response type.
      Parameters:
      responseType - The type of SSO response required (e.g., METADATA, LOGOUT)
      Returns:
      The action response from the SSO authenticator, or null if SSO is not available
    • logout

      public String logout(org.codelibs.fess.mylasta.action.FessUserBean user)
      Performs logout operations for the specified user using SSO.
      Parameters:
      user - The user to logout
      Returns:
      The logout URL from the SSO authenticator, or null if SSO is not available
    • getAuthenticator

      protected SsoAuthenticator getAuthenticator()
      Gets the SSO authenticator instance for the configured SSO type.
      Returns:
      The SSO authenticator instance, or null if not found
    • getSsoType

      protected String getSsoType()
      Gets the configured SSO type from the system configuration.
      Returns:
      The SSO type string from configuration
    • getAuthenticators

      public SsoAuthenticator[] getAuthenticators()
      Gets all registered SSO authenticators.
      Returns:
      Array of all registered SSO authenticators
    • register

      public void register(SsoAuthenticator authenticator)
      Registers an SSO authenticator with this manager.
      Parameters:
      authenticator - The SSO authenticator to register