Class OIDCAuthenticationResponseContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.plugin.oidc.op.messaging.context.OIDCAuthenticationResponseContext
All Implemented Interfaces:
Iterable<BaseContext>

public class OIDCAuthenticationResponseContext extends BaseContext
Subcontext carrying information to form authentication, token and userinfo responses for relying party. This context appears as a subcontext of the MessageContext.
  • Field Details

    • idToken

      @Nullable private IDTokenClaimsSet idToken
      The id token formed.
    • requestObject

      @Nullable private JWT requestObject
      The request object.
    • userInfo

      @Nullable private UserInfo userInfo
      The user info formed.
    • accessTokenClaimsSet

      @Nullable private ClaimsSet accessTokenClaimsSet
      The access token claim set.
    • processedToken

      @Nullable private JWT processedToken
      The signed/encrypted id token / user info response formed.
    • acr

      @Nullable private ACR acr
      the acr used in response.
    • redirectURI

      @Nullable private URI redirectURI
      validated redirect uri.
    • authTime

      @Nullable private Instant authTime
      Authentication time of the end user.
    • validatedScope

      @Nullable private Scope validatedScope
      Validated scope values.
    • validatedAudience

      @Nonnull @NonnullElements private List<String> validatedAudience
      Validated audience values.
    • requestedSubject

      @Nullable private String requestedSubject
      Requested sub value.
    • subject

      @Nullable private String subject
      Subject generated for response. Value is set to sub claim.
    • subjectType

      @Nullable private String subjectType
      Subject type, public or pairwise.
    • authorizationCode

      @Nullable private AuthorizationCode authorizationCode
      Authorization code.
    • accessToken

      @Nullable private AccessToken accessToken
      Access token.
    • refreshToken

      @Nullable private RefreshToken refreshToken
      Refresh token.
    • authorizationGrantClaims

      @Nullable private TokenClaimsSet authorizationGrantClaims
      Authorization grant (authz code, access token) claims.
    • requestedClaims

      @Nullable private OIDCClaimsRequest requestedClaims
      Requested claims.
    • mappedIdTokenRequestedClaims

      @Nullable private AttributesMapContainer mappedIdTokenRequestedClaims
      Mapped requested claims from the ID Token set.
    • mappedUserinfoRequestedClaims

      @Nullable private AttributesMapContainer mappedUserinfoRequestedClaims
      Mapped requested claims from the Userinfo set.
    • sessionId

      @Nullable private String sessionId
      Session identifier.
    • requestObjectFromPar

      private boolean requestObjectFromPar
      Whether request object has been provided from the PAR endooint.
    • requestObjectFailure

      private boolean requestObjectFailure
      Whether request object validation has failed.
    • dpopProofJwkThumbprint

      @Nullable private String dpopProofJwkThumbprint
      DPoP Proof JWK thumbprint.
  • Constructor Details

    • OIDCAuthenticationResponseContext

      public OIDCAuthenticationResponseContext()
      Constructor.
  • Method Details

    • getRequestedClaims

      @Nullable public OIDCClaimsRequest getRequestedClaims()
      Get requested claims.
      Returns:
      requested claims
    • setRequestedClaims

      public void setRequestedClaims(@Nullable OIDCClaimsRequest claims)
      Set requested claims.
      Parameters:
      claims - requested claims
    • getMappedIdTokenRequestedClaims

      @Nullable public AttributesMapContainer getMappedIdTokenRequestedClaims()
      Get the requested claims for the ID Token after they've been reverse-mapped by the registry.
      Returns:
      mapped requested claims
    • setMappedIdTokenRequestedClaims

      public void setMappedIdTokenRequestedClaims(@Nullable AttributesMapContainer container)
      Set the requested claims for the ID Token after they've been reverse-mapped by the registry.
      Parameters:
      container - the container of mapped claims
    • getMappedUserinfoRequestedClaims

      @Nullable public AttributesMapContainer getMappedUserinfoRequestedClaims()
      Get the requested claims for the Userinfo endpoint after they've been reverse-mapped by the registry.
      Returns:
      mapped requested claims
    • setMappedUserinfoRequestedClaims

      public void setMappedUserinfoRequestedClaims(@Nullable AttributesMapContainer container)
      Set the requested claims for the Userinfo endpoint after they've been reverse-mapped by the registry.
      Parameters:
      container - the container of mapped claims
    • getAuthorizationGrantClaimsSet

      @Nullable public TokenClaimsSet getAuthorizationGrantClaimsSet()
      Get the claims representing the authorization grant, which may be derived from an authorization code, refresh token, or assertion.
      Returns:
      token claims
    • setAuthorizationGrantClaimsSet

      public void setAuthorizationGrantClaimsSet(@Nullable TokenClaimsSet claims)
      Set the claims representing the authorization grant, which may be derived from an authorization code, refresh token, or assertion.
      Parameters:
      claims - token claims
    • getAuthorizationCode

      @Nullable public AuthorizationCode getAuthorizationCode()
      Get authorization code.
      Returns:
      authorization code
    • setAuthorizationCode

      public void setAuthorizationCode(@Nullable String code)
      Set authorization code.
      Parameters:
      code - String to form authorization code
    • getRequestedSubject

      @Nullable public String getRequestedSubject()
      Gets requested sub value.
      Returns:
      requested sub value
    • setRequestedSubject

      public void setRequestedSubject(@Nullable String sub)
      Set requested sub value.
      Parameters:
      sub - requested sub value.
    • getSubject

      @Nullable public String getSubject()
      Gets Name ID generated for response.
      Returns:
      Name ID generated for response
    • setSubject

      public void setSubject(@Nullable String generatedSubject)
      Sets generated subject for the response.
      Parameters:
      generatedSubject - subject for the response
    • getSubjectType

      @Nullable public String getSubjectType()
      Gets subject type.
      Returns:
      generated subject type.
    • setSubjectType

      public void setSubjectType(@Nullable String type)
      Sets subject type.
      Parameters:
      type - subject type.
    • getScope

      @Nullable public Scope getScope()
      Get validated scope values.
      Returns:
      validated scope values
    • setScope

      public void setScope(@Nullable Scope scope)
      Set validated scope values.
      Parameters:
      scope - scope values
    • getAudience

      @Nonnull @NonnullElements @Live public List<String> getAudience()
      Get modifiable collection of token audience values.
      Returns:
      audience collection
      Since:
      3.1.0
    • getAuthTime

      @Nullable public Instant getAuthTime()
      Authentication time of the end user.
      Returns:
      authentication time of the end user. null if has not been set.
    • setAuthTime

      public void setAuthTime(@Nullable Instant time)
      Set authentication time of the end user.
      Parameters:
      time - authentication time.
    • getRedirectURI

      @Nullable public URI getRedirectURI()
      Returns a validated redirect uri for the response.
      Returns:
      redirect uri.
    • setRedirectURI

      public void setRedirectURI(@Nullable URI uri)
      Sets a validated redirect uri for the response.
      Parameters:
      uri - validated redirect uri for the response
    • getAcr

      @Nullable public ACR getAcr()
      Returns the acr meant for response.
      Returns:
      acr
    • setAcr

      public void setAcr(@Nullable String acrValue)
      Set acr for response.
      Parameters:
      acrValue - for response.
    • getIDToken

      @Nullable public IDTokenClaimsSet getIDToken()
      Get the IDTokenClaimsSet object that will source the ID token.
      Returns:
      ID token claims set
    • setIDToken

      public void setIDToken(@Nullable IDTokenClaimsSet token)
      Set the IDTokenClaimsSet object that will source the ID token.
      Parameters:
      token - ID token claims set
    • getUserInfo

      @Nullable public UserInfo getUserInfo()
      Get the UserInfo claims set that will source the UserInfo response.
      Returns:
      UserInfo claims set
    • setUserInfo

      public void setUserInfo(@Nullable UserInfo info)
      Set the UserInfo claims set that will source the UserInfo response.
      Parameters:
      info - UserInfo claims set
    • getAccessTokenClaimSet

      @Nullable public ClaimsSet getAccessTokenClaimSet()
      Get the access token claims set (used when prepping OAuth-only access tokens).
      Returns:
      access token claims set
      Since:
      3.1.0
    • setAccessTokenClaimsSet

      public void setAccessTokenClaimsSet(@Nullable ClaimsSet claims)
      Set the access token claims set (used when prepping OAuth-only access tokens).
      Parameters:
      claims - access token claims set
      Since:
      3.1.0
    • getAccessToken

      @Nullable public AccessToken getAccessToken()
      Get access token.
      Returns:
      access token
    • setAccessToken

      public void setAccessToken(@Nullable String token, @Nonnull Duration lifeTime)
      Set access token.
      Parameters:
      token - String to form access token
      lifeTime - lifetime of the access token
    • setAccessToken

      public void setAccessToken(@Nullable String token, @Nonnull Duration lifeTime, @Nullable Scope scope)
      Set access token.
      Parameters:
      token - string to form access token
      lifeTime - lifetime of the access token
      scope - scope of the access token
      Since:
      3.1.0
    • setAccessToken

      public void setAccessToken(@Nullable AccessToken token)
      Set access token.
      Parameters:
      token - the access token
      Since:
      4.2.0
    • getRefreshToken

      @Nullable public RefreshToken getRefreshToken()
      Get refresh token.
      Returns:
      refresh token
    • setRefreshToken

      public void setRefreshToken(@Nullable String token)
      Set refresh token.
      Parameters:
      token - String to form refresh token
    • getProcessedToken

      @Nullable public JWT getProcessedToken()
      Get the signed/encrypted ID token / UserInfo response JWT.
      Returns:
      ID token / UserInfo response JWT
    • setProcessedToken

      public void setProcessedToken(@Nullable JWT token)
      Set the signed/encrypted ID token / UserInfo response JWT.
      Parameters:
      token - ID token / UserInfo response JWT
    • getRequestObject

      @Nullable public JWT getRequestObject()
      Get the request object.
      Returns:
      the request object
    • setRequestObject

      public void setRequestObject(@Nullable JWT obj)
      Set the request object. Either by value or fetched by reference.
      Parameters:
      obj - the request object.
    • getSessionId

      @Nullable public String getSessionId()
      Get the session identifier.
      Returns:
      session identifier
      Since:
      3.3.0
    • setSessionId

      public void setSessionId(@Nullable String sid)
      Set the session identifier.
      Parameters:
      sid - session identifier
      Since:
      3.3.0
    • isRequestObjectFromPar

      public boolean isRequestObjectFromPar()
      Get whether request object has been provided from the PAR endooint.
      Returns:
      true if from the PAR endpoint, false if not
      Since:
      4.2.0
    • setRequestObjectFromPar

      public void setRequestObjectFromPar(boolean flag)
      Set whether request object has been provided from the PAR endooint.
      Parameters:
      flag - true if from the PAR endpoint, false if not
      Since:
      4.2.0
    • isRequestObjectFailure

      public boolean isRequestObjectFailure()
      Get whether request object validation has failed.
      Returns:
      true if failed, false if not
      Since:
      4.2.0
    • setRequestObjectFailure

      public void setRequestObjectFailure(boolean flag)
      Set whether request object validation has failed.
      Parameters:
      flag - true if failed, false if not
      Since:
      4.2.0
    • getDpopProofJwkThumbprint

      @Nullable public String getDpopProofJwkThumbprint()
      Get the DPoP Proof JWK thumbprint.
      Returns:
      DPoP Proof JWK thumbprint
      Since:
      4.2.0
    • setDpopProofJwkThumbprint

      public void setDpopProofJwkThumbprint(@Nullable String jkt)
      Set the DPoP Proof JWK thumbprint.
      Parameters:
      jkt - DPoP Proof JWK thumbprint
      Since:
      4.2.0