Interface ISSOPrincipalService


public interface ISSOPrincipalService
Single sign on service interface
Author:
Logilite Technologies
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    getAuthenticationToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String redirectMode)
    Get the token by authentication code and save in the session attribute SSO_PRINCIPAL_SESSION_TOKEN
    Return login Language from a token
    default String
    Get logout url
    Return user name/ email from a token.
    boolean
    hasAuthenticationCode(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
    Check the request has an authentication code
    boolean
    isAuthenticated(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
    Check the request session attribute SSO_PRINCIPAL_SESSION_TOKEN has token
    void
    redirectForAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String redirectMode)
    Redirect to SSO authentication/login page
    void
    removePrincipalFromSession(javax.servlet.http.HttpServletRequest request)
    Remove all SSO-related attributes from the session.
  • Field Details

  • Method Details

    • hasAuthenticationCode

      boolean hasAuthenticationCode(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Check the request has an authentication code
      Parameters:
      request - HttpServletRequest
      response - HttpServletResponse
      Returns:
    • getAuthenticationToken

      void getAuthenticationToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String redirectMode) throws Throwable
      Get the token by authentication code and save in the session attribute SSO_PRINCIPAL_SESSION_TOKEN
      Parameters:
      request - HttpServletRequest
      response - HttpServletResponse
      redirectMode - "SSO_MODE_WEBUI", "SSO_MODE_OSGI", "SSO_MODE_MONITOR"
      Throws:
      Throwable
    • isAuthenticated

      boolean isAuthenticated(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Check the request session attribute SSO_PRINCIPAL_SESSION_TOKEN has token
      Parameters:
      request - HttpServletRequest
      response - HttpServletResponse
      Returns:
    • redirectForAuthentication

      void redirectForAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String redirectMode) throws IOException
      Redirect to SSO authentication/login page
      Parameters:
      request - HttpServletRequest
      response - HttpServletResponse
      redirectMode - "SSO_MODE_WEBUI", "SSO_MODE_OSGI", "SSO_MODE_MONITOR"
      Throws:
      IOException
    • removePrincipalFromSession

      void removePrincipalFromSession(javax.servlet.http.HttpServletRequest request)
      Remove all SSO-related attributes from the session.
      Parameters:
      request - HttpServletRequest
    • getUserName

      String getUserName(Object token) throws ParseException
      Return user name/ email from a token.
      Parameters:
      token - authentication token
      Returns:
      User Name/email
      Throws:
      ParseException
    • getLanguage

      Language getLanguage(Object token) throws ParseException
      Return login Language from a token
      Parameters:
      token - authentication token
      Returns:
      Login Language
      Throws:
      ParseException
    • getLogoutURL

      default String getLogoutURL()
      Get logout url
      Returns:
      logout url or null