Class CdSsoContext

java.lang.Object
org.forgerock.services.context.AbstractContext
org.forgerock.openig.openam.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.

  • Field Details

  • Constructor Details

    • CdSsoContext

      public CdSsoContext(Context parent, String token, JwtClaimsSet claimsSet, String redirectEndpoint, org.forgerock.openig.http.protocol.CookieBuilder cookieBuilder, Duration authnStateLifetime)
      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.
      authnStateLifetime - The lifetime of the authnState value in the session.
  • Method Details

    • 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
    • getAuthnStateLifetime

      public Duration getAuthnStateLifetime()
      Get the lifetime of the authentication state.
      Returns:
      the lifetime of the authentication state