Class OIDCAuthenticationResponseContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.plugin.oidc.op.messaging.context.OIDCAuthenticationResponseContext
- All Implemented Interfaces:
Iterable<BaseContext>
Subcontext carrying information to form authentication, token and userinfo responses for relying party. This context
appears as a subcontext of the
MessageContext.-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator, BaseContext.DeprecatedContextClassNameLookAside -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.nimbusds.oauth2.sdk.token.AccessTokenAccess token.private com.nimbusds.openid.connect.sdk.claims.ClaimsSetThe access token claim set.private com.nimbusds.openid.connect.sdk.claims.ACRthe acr used in response.private com.nimbusds.oauth2.sdk.AuthorizationCodeAuthorization code.private TokenClaimsSetAuthorization grant (authz code, access token) claims.private InstantAuthentication time of the end user.private com.nimbusds.openid.connect.sdk.claims.IDTokenClaimsSetThe id token formed.private AttributesMapContainerMapped requested claims from the ID Token set.private AttributesMapContainerMapped requested claims from the Userinfo set.private com.nimbusds.jwt.JWTThe signed/encrypted id token / user info response formed.private URIvalidated redirect uri.private com.nimbusds.oauth2.sdk.token.RefreshTokenRefresh token.private com.nimbusds.openid.connect.sdk.OIDCClaimsRequestRequested claims.private StringRequested sub value.private com.nimbusds.jwt.JWTThe request object.private StringSession identifier.private StringSubject generated for response.private StringSubject type, public or pairwise.private com.nimbusds.openid.connect.sdk.claims.UserInfoThe user info formed.Validated audience values.private com.nimbusds.oauth2.sdk.ScopeValidated scope values. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.nimbusds.oauth2.sdk.token.AccessTokenGet access token.com.nimbusds.openid.connect.sdk.claims.ClaimsSetGet the access token claims set (used when prepping OAuth-only access tokens).com.nimbusds.openid.connect.sdk.claims.ACRgetAcr()Returns the acr meant for response.Get modifiable collection of token audience values.com.nimbusds.oauth2.sdk.AuthorizationCodeGet authorization code.Get the claims representing the authorization grant, which may be derived from an authorization code, refresh token, or assertion.Authentication time of the end user.com.nimbusds.openid.connect.sdk.claims.IDTokenClaimsSetGet theIDTokenClaimsSetobject that will source the ID token.Get the requested claims for the ID Token after they've been reverse-mapped by the registry.Get the requested claims for the Userinfo endpoint after they've been reverse-mapped by the registry.com.nimbusds.jwt.JWTGet the signed/encrypted ID token / UserInfo response JWT.Returns a validated redirect uri for the response.com.nimbusds.oauth2.sdk.token.RefreshTokenGet refresh token.com.nimbusds.openid.connect.sdk.OIDCClaimsRequestGet requested claims.Gets requested sub value.com.nimbusds.jwt.JWTGet the request object.com.nimbusds.oauth2.sdk.ScopegetScope()Get validated scope values.Get the session identifier.Gets Name ID generated for response.Gets subject type.com.nimbusds.openid.connect.sdk.claims.UserInfoGet theUserInfoclaims set that will source the UserInfo response.voidsetAccessToken(String token, Duration lifeTime) Set access token.voidsetAccessToken(String token, Duration lifeTime, com.nimbusds.oauth2.sdk.Scope scope) Set access token.voidsetAccessTokenClaimsSet(com.nimbusds.openid.connect.sdk.claims.ClaimsSet claims) Set the access token claims set (used when prepping OAuth-only access tokens).voidSet acr for response.voidsetAuthorizationCode(String code) Set authorization code.voidSet the claims representing the authorization grant, which may be derived from an authorization code, refresh token, or assertion.voidsetAuthTime(Instant time) Set authentication time of the end user.voidsetIDToken(com.nimbusds.openid.connect.sdk.claims.IDTokenClaimsSet token) Set theIDTokenClaimsSetobject that will source the ID token.voidSet the requested claims for the ID Token after they've been reverse-mapped by the registry.voidSet the requested claims for the Userinfo endpoint after they've been reverse-mapped by the registry.voidsetProcessedToken(com.nimbusds.jwt.JWT token) Set the signed/encrypted ID token / UserInfo response JWT.voidsetRedirectURI(URI uri) Sets a validated redirect uri for the response.voidsetRefreshToken(String token) Set refresh token.voidsetRequestedClaims(com.nimbusds.openid.connect.sdk.OIDCClaimsRequest claims) Set requested claims.voidSet requested sub value.voidsetRequestObject(com.nimbusds.jwt.JWT obj) Set the request object.voidsetScope(com.nimbusds.oauth2.sdk.Scope scope) Set validated scope values.voidsetSessionId(String sid) Set the session identifier.voidsetSubject(String generatedSubject) Sets generated subject for the response.voidsetSubjectType(String type) Sets subject type.voidsetUserInfo(com.nimbusds.openid.connect.sdk.claims.UserInfo info) Set theUserInfoclaims set that will source the UserInfo response.Methods inherited from class org.opensaml.messaging.context.BaseContext
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, ensureSubcontext, ensureSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeFromParent, removeSubcontext, removeSubcontext, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
idToken
@Nullable private com.nimbusds.openid.connect.sdk.claims.IDTokenClaimsSet idTokenThe id token formed. -
requestObject
@Nullable private com.nimbusds.jwt.JWT requestObjectThe request object. -
userInfo
@Nullable private com.nimbusds.openid.connect.sdk.claims.UserInfo userInfoThe user info formed. -
accessTokenClaimsSet
@Nullable private com.nimbusds.openid.connect.sdk.claims.ClaimsSet accessTokenClaimsSetThe access token claim set. -
processedToken
@Nullable private com.nimbusds.jwt.JWT processedTokenThe signed/encrypted id token / user info response formed. -
acr
@Nullable private com.nimbusds.openid.connect.sdk.claims.ACR acrthe acr used in response. -
redirectURI
validated redirect uri. -
authTime
Authentication time of the end user. -
validatedScope
@Nullable private com.nimbusds.oauth2.sdk.Scope validatedScopeValidated scope values. -
validatedAudience
Validated audience values. -
requestedSubject
Requested sub value. -
subject
Subject generated for response. Value is set to sub claim. -
subjectType
Subject type, public or pairwise. -
authorizationCode
@Nullable private com.nimbusds.oauth2.sdk.AuthorizationCode authorizationCodeAuthorization code. -
accessToken
@Nullable private com.nimbusds.oauth2.sdk.token.AccessToken accessTokenAccess token. -
refreshToken
@Nullable private com.nimbusds.oauth2.sdk.token.RefreshToken refreshTokenRefresh token. -
authorizationGrantClaims
Authorization grant (authz code, access token) claims. -
requestedClaims
@Nullable private com.nimbusds.openid.connect.sdk.OIDCClaimsRequest requestedClaimsRequested claims. -
mappedIdTokenRequestedClaims
Mapped requested claims from the ID Token set. -
mappedUserinfoRequestedClaims
Mapped requested claims from the Userinfo set. -
sessionId
Session identifier.
-
-
Constructor Details
-
OIDCAuthenticationResponseContext
public OIDCAuthenticationResponseContext()Constructor.
-
-
Method Details
-
getRequestedClaims
@Nullable public com.nimbusds.openid.connect.sdk.OIDCClaimsRequest getRequestedClaims()Get requested claims.- Returns:
- requested claims
-
setRequestedClaims
public void setRequestedClaims(@Nullable com.nimbusds.openid.connect.sdk.OIDCClaimsRequest claims) Set requested claims.- Parameters:
claims- requested claims
-
getMappedIdTokenRequestedClaims
Get the requested claims for the ID Token after they've been reverse-mapped by the registry.- Returns:
- mapped requested claims
-
setMappedIdTokenRequestedClaims
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
Get the requested claims for the Userinfo endpoint after they've been reverse-mapped by the registry.- Returns:
- mapped requested claims
-
setMappedUserinfoRequestedClaims
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
Get the claims representing the authorization grant, which may be derived from an authorization code, refresh token, or assertion.- Returns:
- token claims
-
setAuthorizationGrantClaimsSet
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 com.nimbusds.oauth2.sdk.AuthorizationCode getAuthorizationCode()Get authorization code.- Returns:
- authorization code
-
setAuthorizationCode
Set authorization code.- Parameters:
code- String to form authorization code
-
getRequestedSubject
Gets requested sub value.- Returns:
- requested sub value
-
setRequestedSubject
Set requested sub value.- Parameters:
sub- requested sub value.
-
getSubject
Gets Name ID generated for response.- Returns:
- Name ID generated for response
-
setSubject
Sets generated subject for the response.- Parameters:
generatedSubject- subject for the response
-
getSubjectType
Gets subject type.- Returns:
- generated subject type.
-
setSubjectType
Sets subject type.- Parameters:
type- subject type.
-
getScope
@Nullable public com.nimbusds.oauth2.sdk.Scope getScope()Get validated scope values.- Returns:
- validated scope values
-
setScope
public void setScope(@Nullable com.nimbusds.oauth2.sdk.Scope scope) Set validated scope values.- Parameters:
scope- scope values
-
getAudience
Get modifiable collection of token audience values.- Returns:
- audience collection
- Since:
- 3.1.0
-
getAuthTime
Authentication time of the end user.- Returns:
- authentication time of the end user. null if has not been set.
-
setAuthTime
Set authentication time of the end user.- Parameters:
time- authentication time.
-
getRedirectURI
Returns a validated redirect uri for the response.- Returns:
- redirect uri.
-
setRedirectURI
Sets a validated redirect uri for the response.- Parameters:
uri- validated redirect uri for the response
-
getAcr
@Nullable public com.nimbusds.openid.connect.sdk.claims.ACR getAcr()Returns the acr meant for response.- Returns:
- acr
-
setAcr
Set acr for response.- Parameters:
acrValue- for response.
-
getIDToken
@Nullable public com.nimbusds.openid.connect.sdk.claims.IDTokenClaimsSet getIDToken()Get theIDTokenClaimsSetobject that will source the ID token.- Returns:
- ID token claims set
-
setIDToken
public void setIDToken(@Nullable com.nimbusds.openid.connect.sdk.claims.IDTokenClaimsSet token) Set theIDTokenClaimsSetobject that will source the ID token.- Parameters:
token- ID token claims set
-
getUserInfo
@Nullable public com.nimbusds.openid.connect.sdk.claims.UserInfo getUserInfo()Get theUserInfoclaims set that will source the UserInfo response.- Returns:
- UserInfo claims set
-
setUserInfo
public void setUserInfo(@Nullable com.nimbusds.openid.connect.sdk.claims.UserInfo info) Set theUserInfoclaims set that will source the UserInfo response.- Parameters:
info- UserInfo claims set
-
getAccessTokenClaimSet
@Nullable public com.nimbusds.openid.connect.sdk.claims.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 com.nimbusds.openid.connect.sdk.claims.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 com.nimbusds.oauth2.sdk.token.AccessToken getAccessToken()Get access token.- Returns:
- access token
-
setAccessToken
Set access token.- Parameters:
token- String to form access tokenlifeTime- lifetime of the access token
-
setAccessToken
public void setAccessToken(@Nullable String token, @Nonnull Duration lifeTime, @Nullable com.nimbusds.oauth2.sdk.Scope scope) Set access token.- Parameters:
token- string to form access tokenlifeTime- lifetime of the access tokenscope- scope of the access token- Since:
- 3.1.0
-
getRefreshToken
@Nullable public com.nimbusds.oauth2.sdk.token.RefreshToken getRefreshToken()Get refresh token.- Returns:
- refresh token
-
setRefreshToken
Set refresh token.- Parameters:
token- String to form refresh token
-
getProcessedToken
@Nullable public com.nimbusds.jwt.JWT getProcessedToken()Get the signed/encrypted ID token / UserInfo response JWT.- Returns:
- ID token / UserInfo response JWT
-
setProcessedToken
public void setProcessedToken(@Nullable com.nimbusds.jwt.JWT token) Set the signed/encrypted ID token / UserInfo response JWT.- Parameters:
token- ID token / UserInfo response JWT
-
getRequestObject
@Nullable public com.nimbusds.jwt.JWT getRequestObject()Get the request object.- Returns:
- the request object
-
setRequestObject
public void setRequestObject(@Nullable com.nimbusds.jwt.JWT obj) Set the request object. Either by value or fetched by reference.- Parameters:
obj- the request object.
-
getSessionId
Get the session identifier.- Returns:
- session identifier
- Since:
- 3.3.0
-
setSessionId
Set the session identifier.- Parameters:
sid- session identifier- Since:
- 3.3.0
-