Class DefaultRevokeConsentPredicate
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.plugin.oidc.op.profile.logic.DefaultRevokeConsentPredicate
- All Implemented Interfaces:
Predicate<ProfileRequestContext>,Component,DestructableComponent,InitializableComponent
public class DefaultRevokeConsentPredicate
extends AbstractInitializableComponent
implements Predicate<ProfileRequestContext>
Default predicate to decide if the pre-existing consent should be revoked. By default the revocation is done if the
scope offline_access was requested (and granted) or if prompt contained consent value.
- Since:
- 4.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private Function<ProfileRequestContext,com.nimbusds.openid.connect.sdk.Prompt> Strategy used to obtain the requested prompt value.private Predicate<ProfileRequestContext>Predicate used to determine if consent should be revoked with consent prompt.private Predicate<ProfileRequestContext>Predicate used to determine if consent should be revoked with offline_access scope.private Function<ProfileRequestContext,com.nimbusds.oauth2.sdk.Scope> Strategy used to obtain the validated scope value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidsetPromptLookupStrategy(Function<ProfileRequestContext, com.nimbusds.openid.connect.sdk.Prompt> strategy) Set the strategy used to locate the requested prompt.voidSet the predicate used to determine if consent should be revoked with consent prompt.voidSet the predicate used to determine if consent should be revoked with offline_access scope.voidsetScopeLookupStrategy(Function<ProfileRequestContext, com.nimbusds.oauth2.sdk.Scope> strategy) Set the strategy used to locate the validated scope.booleantest(ProfileRequestContext input) Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
scopeLookupStrategy
Strategy used to obtain the validated scope value. -
promptLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,com.nimbusds.openid.connect.sdk.Prompt> promptLookupStrategyStrategy used to obtain the requested prompt value. -
revokeWithOfflineAccessScopePredicate
Predicate used to determine if consent should be revoked with offline_access scope. -
revokeWithConsentPromptPredicate
Predicate used to determine if consent should be revoked with consent prompt.
-
-
Constructor Details
-
DefaultRevokeConsentPredicate
public DefaultRevokeConsentPredicate()Constructor.
-
-
Method Details
-
setScopeLookupStrategy
public void setScopeLookupStrategy(@Nonnull Function<ProfileRequestContext, com.nimbusds.oauth2.sdk.Scope> strategy) Set the strategy used to locate the validated scope.- Parameters:
strategy- What to set.
-
setPromptLookupStrategy
public void setPromptLookupStrategy(@Nonnull Function<ProfileRequestContext, com.nimbusds.openid.connect.sdk.Prompt> strategy) Set the strategy used to locate the requested prompt.- Parameters:
strategy- What to set.
-
setRevokeWithOfflineAccessScopePredicate
public void setRevokeWithOfflineAccessScopePredicate(@Nonnull Predicate<ProfileRequestContext> predicate) Set the predicate used to determine if consent should be revoked with offline_access scope.- Parameters:
predicate- What to set.
-
setRevokeWithConsentPromptPredicate
public void setRevokeWithConsentPromptPredicate(@Nonnull Predicate<ProfileRequestContext> predicate) Set the predicate used to determine if consent should be revoked with consent prompt.- Parameters:
predicate- What to set.
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
test
- Specified by:
testin interfacePredicate<ProfileRequestContext>
-