Class FSPostLogin


  • public class FSPostLogin
    extends Object
    This class defines methods which will be invoked post Single Sign-On/Federation.
    • Constructor Detail

      • FSPostLogin

        public FSPostLogin()
    • Method Detail

      • allowedRelayState

        public static String allowedRelayState​(jakarta.servlet.http.HttpServletRequest request,
                                               String relayState)
        Checks a RelayState a caller supplied for an AuthnRequest. The AuthnRequest carries it to the IdP and back, and the assertion consumer redirects to it a request later without checking it again, so it is checked here, before it is stored.
        Parameters:
        request - the request carrying the metaAlias.
        relayState - the request supplied RelayState.
        Returns:
        relayState when the provider's allow-list permits it, otherwise null: a refused RelayState is treated as one the caller did not send.
      • allowedRelayState

        public static String allowedRelayState​(String realm,
                                               String entityID,
                                               String role,
                                               String relayState)
        Checks a RelayState a caller supplied against the allow-list of a hosted provider already resolved, for the callers that resolved it themselves.
        Parameters:
        realm - the realm of the hosted provider.
        entityID - the hosted provider's entity ID, null if it did not resolve.
        role - the hosted provider's role, null if it did not resolve.
        relayState - the request supplied RelayState.
        Returns:
        relayState when the provider's allow-list permits it, otherwise null: a refused RelayState is treated as one the caller did not send.
      • doPostLogin

        public void doPostLogin​(jakarta.servlet.http.HttpServletRequest request,
                                jakarta.servlet.http.HttpServletResponse response)
        Retreives and forwards request to URL after login.
        Parameters:
        request - HttpServletRequest object.
        response - HttpServletResponse object.
      • doConsentToIntro

        public String doConsentToIntro​(jakarta.servlet.http.HttpServletRequest request)
                                throws FSPostLoginException
        Returns the introduction URL.
        Parameters:
        request - the HttpServletRequest object.
        Returns:
        a String the Introduction URL.
        Throws:
        FSPostLoginException - on error.
      • doFederation

        public String doFederation​(jakarta.servlet.http.HttpServletRequest request,
                                   jakarta.servlet.http.HttpServletResponse response)
                            throws FSPostLoginException
        Returns the URL to which request should be redirected for federation. This method reads the request parameters and creates an Authentication Request to send to initiate the Single Sign-On / Federation process.
        Parameters:
        request - the HttpServletRequest object.
        response - the HttpServletResponse object.
        Returns:
        the URL to redirect request to.
        Throws:
        FSPostLoginException - on error.