Class ValidateAudience
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<com.nimbusds.openid.connect.sdk.AuthenticationRequest>
net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCAuthenticationRequestAction
net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCAuthenticationResponseAction
net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.ValidateAudience
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that validates requested resource/audience values against a computed set of "allowed"
values and populates the resulting set into the
OIDCAuthenticationResponseContext
and a ProxiedRequesterContext.
This is an ordered list, so the first allowed value determines the "primary" audience of the eventual token.
Requesting values is optional. If the OP is an implied audience, then no other audience will be established, but if not then at least one audience must be permitted and the first permitted value will be assumed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,List<String>> Strategy used to obtain the audience allowed for the client.private Predicate<ProfileRequestContext>Whether to enforce solely the OP as audience.private org.slf4j.LoggerClass logger.Strategy used for locating/creating the proxy context.private Function<ProfileRequestContext,String> Strategy used to obtain the relying party ID.private Function<ProfileRequestContext,List<String>> Strategy used to obtain the requested audience.private Predicate<ProfileRequestContext>Whether the request includes the OP as an audience. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) voidSet the strategy used to locate the allowed audience for the client.voidSet whether to enforce solely the OP as audience.voidsetProxiedRequesterContextCreationStrategy(Function<ProfileRequestContext, ProxiedRequesterContext> strategy) Set the strategy used to locate or create the ProxiedRequesterContext.voidSet the strategy used to obtain the relying party ID.voidSet the strategy used to locate the requested audience to validate.voidsetSelfAudienceCondition(Predicate<ProfileRequestContext> condition) Set whether the OP is an implied audience for the token request.Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCAuthenticationResponseAction
doPreExecute, getMetadataContext, getOidcResponseContextMethods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCAuthenticationRequestAction
getAuthenticationRequestMethods 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, 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 org.slf4j.Logger logClass logger. -
relyingPartyIdLookupStrategy
Strategy used to obtain the relying party ID. -
requestedAudienceLookupStrategy
Strategy used to obtain the requested audience. -
allowedAudienceLookupStrategy
Strategy used to obtain the audience allowed for the client. -
proxiedRequesterContextCreationStrategy
@Nonnull private Function<ProfileRequestContext,ProxiedRequesterContext> proxiedRequesterContextCreationStrategyStrategy used for locating/creating the proxy context. -
selfAudienceCondition
Whether the request includes the OP as an audience. -
enforceSelfAudienceCondition
Whether to enforce solely the OP as audience.
-
-
Constructor Details
-
ValidateAudience
public ValidateAudience()Constructor.
-
-
Method Details
-
setRelyingPartyIdLookupStrategy
public void setRelyingPartyIdLookupStrategy(@Nonnull Function<ProfileRequestContext, String> strategy) Set the strategy used to obtain the relying party ID.- Parameters:
strategy- lookup strategy
-
setRequestedAudienceLookupStrategy
public void setRequestedAudienceLookupStrategy(@Nullable Function<ProfileRequestContext, List<String>> strategy) Set the strategy used to locate the requested audience to validate.- Parameters:
strategy- lookup strategy
-
setAllowedAudienceLookupStrategy
public void setAllowedAudienceLookupStrategy(@Nonnull Function<ProfileRequestContext, List<String>> strategy) Set the strategy used to locate the allowed audience for the client.- Parameters:
strategy- lookup strategy
-
setProxiedRequesterContextCreationStrategy
public void setProxiedRequesterContextCreationStrategy(@Nonnull Function<ProfileRequestContext, ProxiedRequesterContext> strategy) Set the strategy used to locate or create the ProxiedRequesterContext.- Parameters:
strategy- lookup/creation strategy
-
setSelfAudienceCondition
Set whether the OP is an implied audience for the token request.- Parameters:
condition- condition to set- Since:
- 3.2.0
-
setEnforceSelfAudienceCondition
Set whether to enforce solely the OP as audience.- Parameters:
condition- condition to set- Since:
- 4.2.0
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-