Class ValidateClientIDAgainstPolicy
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.oauth2.profile.impl.ValidateClientIDAgainstPolicy
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Validates a client ID against unregistered client policy via configurable policy enforcer. The validation is done
only if
OIDCMetadataContext is not found under the inbound message context.- Since:
- 4.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ClientIDOAuth2 client id.private Function<MessageContext,ClientID> Strategy used to obtain the client id value for authorize/token request.private final org.slf4j.LoggerClass logger.private Map<String,UnregisteredClientPolicy> The policies used for validating client id.private BiFunction<Object,MetadataPolicy, Pair<Object, Boolean>> Enforcer function for validating client ID against the configured policy.Strategy used to locate the unregistered client policy configured for the profile. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidsetClientIDLookupStrategy(Function<MessageContext, ClientID> strategy) Set the strategy used to locate the client id of the request.voidsetUnregisteredClientPolicyEnforcer(BiFunction<Object, MetadataPolicy, Pair<Object, Boolean>> enforcer) Set the enforcer function for validating client ID against the configured policy.voidsetUnregisteredClientPolicyLookupStrategy(Function<ProfileRequestContext, Map<String, UnregisteredClientPolicy>> strategy) Set the strategy used to locate the unregistered client policy configured for the profile.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. -
unregisteredClientPolicyLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,Map<String, unregisteredClientPolicyLookupStrategyUnregisteredClientPolicy>> Strategy used to locate the unregistered client policy configured for the profile. -
clientIDLookupStrategy
Strategy used to obtain the client id value for authorize/token request. -
unregisteredClientPolicyEnforcer
@Nonnull private BiFunction<Object,MetadataPolicy, unregisteredClientPolicyEnforcerPair<Object, Boolean>> Enforcer function for validating client ID against the configured policy. -
clientId
OAuth2 client id. -
policies
The policies used for validating client id.
-
-
Constructor Details
-
ValidateClientIDAgainstPolicy
public ValidateClientIDAgainstPolicy()Constructor.
-
-
Method Details
-
setClientIDLookupStrategy
Set the strategy used to locate the client id of the request.- Parameters:
strategy- lookup strategy
-
setUnregisteredClientPolicyLookupStrategy
public void setUnregisteredClientPolicyLookupStrategy(Function<ProfileRequestContext, Map<String, UnregisteredClientPolicy>> strategy) Set the strategy used to locate the unregistered client policy configured for the profile.- Parameters:
strategy- lookup strategy
-
setUnregisteredClientPolicyEnforcer
public void setUnregisteredClientPolicyEnforcer(BiFunction<Object, MetadataPolicy, Pair<Object, Boolean>> enforcer) Set the enforcer function for validating client ID against the configured policy.- Parameters:
enforcer- policy enforcer
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-