Class ValidateUserInfoJSONObjectClaims
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.authn.oidc.rp.impl.ValidateUserInfoJSONObjectClaims
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Validate a successful UserInfo JSON Object Response according to section 5.3.2 of OpenID Connect Core 1.0.
- Event:
EventIds.PROCEED_EVENT_ID,OidcEventIds.INVALID_USERINFO_CLAIMS,EventIds.INVALID_PROFILE_CTX- Precondition:
ProfileRequestContext.getSubcontext(AuthenticationContext.class, false) != null
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.nimbusds.jwt.JWTClaimsSetThe stashed id_token claims.private final org.slf4j.LoggerClass logger.Strategy used to look up theAccessTokenResponseContext.private com.nimbusds.openid.connect.sdk.UserInfoSuccessResponseThe stashed user info response.private UserInfoResponseContextThe stashed user info response context.Strategy used to look up theUserInfoResponseContext. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext) private com.nimbusds.openid.connect.sdk.claims.ClaimsSetresolveClaimsSet(com.nimbusds.openid.connect.sdk.UserInfoResponse response) Resolve the UserInfo claims from the user info response.voidsetTokenResponseContextLookupStrategy(Function<ProfileRequestContext, AccessTokenResponseContext> strategy) Set the strategy used to look up aAccessTokenResponseContext.voidsetUserInfoResponseContextLookupStrategy(Function<ProfileRequestContext, UserInfoResponseContext> strategy) Set the strategy used to look up aUserInfoResponseContext.Methods 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, doInitialize, 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 final org.slf4j.Logger logClass logger. -
userInfoResponseContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,UserInfoResponseContext> userInfoResponseContextLookupStrategyStrategy used to look up theUserInfoResponseContext. -
tokenResponseContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,AccessTokenResponseContext> tokenResponseContextLookupStrategyStrategy used to look up theAccessTokenResponseContext. -
userInfoCtx
The stashed user info response context. -
userInfo
The stashed user info response. -
idTokenClaims
The stashed id_token claims.
-
-
Constructor Details
-
ValidateUserInfoJSONObjectClaims
public ValidateUserInfoJSONObjectClaims()Constructor.
-
-
Method Details
-
setTokenResponseContextLookupStrategy
public void setTokenResponseContextLookupStrategy(@Nonnull Function<ProfileRequestContext, AccessTokenResponseContext> strategy) Set the strategy used to look up aAccessTokenResponseContext.- Parameters:
strategy- lookup strategy
-
setUserInfoResponseContextLookupStrategy
public void setUserInfoResponseContextLookupStrategy(@Nonnull Function<ProfileRequestContext, UserInfoResponseContext> strategy) Set the strategy used to look up aUserInfoResponseContext.- Parameters:
strategy- lookup strategy
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
resolveClaimsSet
@Nullable private com.nimbusds.openid.connect.sdk.claims.ClaimsSet resolveClaimsSet(@Nonnull com.nimbusds.openid.connect.sdk.UserInfoResponse response) Resolve the UserInfo claims from the user info response. If JWT type, extract from the JWT claims. If plain JSON object type, resolve directly from the UserInfo claims set.- Parameters:
response- the UserInfo response- Returns:
- the UserInfo claims. Return
nullif not found, wrong response type, or there was a parsing exception
-