Class ParseAccessToken
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCRequestAction<UserInfoRequest>
net.shibboleth.idp.plugin.oidc.op.userinfo.profile.impl.AbstractOIDCUserInfoRequestAction
net.shibboleth.idp.plugin.oidc.op.userinfo.profile.impl.AbstractOIDCUserInfoValidationResponseAction
net.shibboleth.idp.plugin.oidc.op.userinfo.profile.impl.ParseAccessToken
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that parses an access token and initially populates the claims for later
validation.
Signed JWTs are also signature-checked here.
The parsed token is stored to the response context retrievable as claims via
OIDCAuthenticationResponseContext.getAuthorizationGrantClaimsSet(). Claims validation takes
place later in order to allow for metadata and relying-party/profile config
lookup to allow for pluggable validation, an overridden OP/issuer name, etc.
- Since:
- 3.2.0
- Event:
EventIds.PROCEED_EVENT_ID,OidcEventIds.INVALID_ACCESS_TOKEN,OidcEventIds.INVALID_DPOP_ACCESS_TOKEN
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CredentialResolverSource of signing keys.private DataSealerData sealer for unwrapping authorization code.private Predicate<ProfileRequestContext>Predicate for deciding to refer to DPoP in error responses.private org.slf4j.LoggerClass logger.private SignedJWTCopy of signed JWT for non-opaque access tokens. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected AccessTokenClaimsSetparseAccessToken(AccessToken token) Attempt to parse token.voidsetCredentialResolver(CredentialResolver resolver) Set the source of signing keys to use for JWT signature verification.voidsetDataSealer(DataSealer sealer) Set the data sealer instance to use.voidSet the predicate for deciding to refer to DPoP in error responses.Methods inherited from class net.shibboleth.idp.plugin.oidc.op.userinfo.profile.impl.AbstractOIDCUserInfoValidationResponseAction
doPreExecute, getOidcResponseContextMethods inherited from class net.shibboleth.idp.plugin.oidc.op.userinfo.profile.impl.AbstractOIDCUserInfoRequestAction
getUserInfoRequestMethods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCRequestAction
getRequestMethods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
dataSealer
Data sealer for unwrapping authorization code. -
credentialResolver
Source of signing keys. -
dpopAccessTokenCondition
Predicate for deciding to refer to DPoP in error responses. -
signedJWT
Copy of signed JWT for non-opaque access tokens.
-
-
Constructor Details
-
ParseAccessToken
public ParseAccessToken()
-
-
Method Details
-
setCredentialResolver
Set the source of signing keys to use for JWT signature verification.- Parameters:
resolver- signing key resolver
-
setDpopAccessTokenCondition
Set the predicate for deciding to refer to DPoP in error responses.- Parameters:
condition- predicate to set- Since:
- 4.2.0
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
parseAccessToken
Attempt to parse token.- Parameters:
token- the token- Returns:
- parsed claim set or null