Class CdSsoContext

  • All Implemented Interfaces:
    Context

    public class CdSsoContext
    extends AbstractContext
    Context implementation to maintain cross-domain SSO properties. This includes the encoded JWT, ForgeRock session uid and the full claims set. Note that the SSO token is held on an SSOContext that should exist as a child of this context.

    Note that the CdSsoContext does not seek to validate the JwtClaimsSet supplied, other than being non-null. However, as it uses it to separately retain the session uid, if this is not present then an error is raised.

    • Constructor Detail

      • CdSsoContext

        public CdSsoContext​(Context parent,
                            String token,
                            JwtClaimsSet claimsSet,
                            String redirectEndpoint,
                            org.forgerock.openig.http.protocol.CookieBuilder cookieBuilder)
        Create CdSsoContext for supplied JWT.
        Parameters:
        parent - The parent Context.
        token - The JWT token.
        claimsSet - The JWT's claims set.
        redirectEndpoint - CDSSO redirect endpoint used in AM redirect.
        cookieBuilder - CDSSO authentication cookie builder.
    • Method Detail

      • getToken

        public String getToken()
        Get the encoded JWT.
        Returns:
        The encoded JWT.
      • getSessionUid

        public String getSessionUid()
        Get the ForgeRock session uid.
        Returns:
        the session uid.
      • getClaimsSet

        public JwtClaimsSet getClaimsSet()
        Get a copy of the JWT claims set.
        Returns:
        The JWT claims set
      • getRedirectEndpoint

        public String getRedirectEndpoint()
        Configured redirect endpoint URI used in AM communication.
        Returns:
        the redirect endpoint URI
      • getCookieBuilder

        public org.forgerock.openig.http.protocol.CookieBuilder getCookieBuilder()
        Get the CDSSO authentication cookie builder.
        Returns:
        a CookieBuilder