Class FSPostLogin
- java.lang.Object
-
- com.sun.identity.federation.login.FSPostLogin
-
public class FSPostLogin extends Object
This class defines methods which will be invoked post Single Sign-On/Federation.
-
-
Constructor Summary
Constructors Constructor Description FSPostLogin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringallowedRelayState(jakarta.servlet.http.HttpServletRequest request, String relayState)Checks a RelayState a caller supplied for an AuthnRequest.static StringallowedRelayState(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.StringdoConsentToIntro(jakarta.servlet.http.HttpServletRequest request)Returns the introduction URL.StringdoFederation(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Returns the URL to which request should be redirected for federation.voiddoPostLogin(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)Retreives and forwards request to URL after login.
-
-
-
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:
relayStatewhen the provider's allow-list permits it, otherwisenull: 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,nullif it did not resolve.role- the hosted provider's role,nullif it did not resolve.relayState- the request supplied RelayState.- Returns:
relayStatewhen the provider's allow-list permits it, otherwisenull: 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-HttpServletRequestobject.response-HttpServletResponseobject.
-
doConsentToIntro
public String doConsentToIntro(jakarta.servlet.http.HttpServletRequest request) throws FSPostLoginException
Returns the introduction URL.- Parameters:
request- theHttpServletRequestobject.- 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- theHttpServletRequestobject.response- theHttpServletResponseobject.- Returns:
- the URL to redirect request to.
- Throws:
FSPostLoginException- on error.
-
-