Class OAuth2TokenRevocationConfiguration
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- net.shibboleth.idp.profile.config.AbstractProfileConfiguration
-
- net.shibboleth.idp.profile.config.AbstractConditionalProfileConfiguration
-
- net.shibboleth.oidc.profile.oauth2.config.AbstractOAuth2ClientAuthenticableProfileConfiguration
-
- net.shibboleth.oidc.profile.oauth2.config.AbstractOAuth2TokenValidatingConfiguration
-
- net.shibboleth.oidc.profile.oauth2.config.OAuth2TokenRevocationConfiguration
-
- All Implemented Interfaces:
net.shibboleth.idp.authn.config.AuthenticationProfileConfiguration,net.shibboleth.idp.profile.config.ConditionalProfileConfiguration,net.shibboleth.idp.profile.config.OverriddenIssuerProfileConfiguration,net.shibboleth.idp.profile.config.ProfileConfiguration,OAuth2ProfileConfiguration,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class OAuth2TokenRevocationConfiguration extends AbstractOAuth2TokenValidatingConfiguration
Profile configuration for the OAuth2 Token Revocation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOAuth2TokenRevocationConfiguration.OAuth2TokenRevocationMethodEnumeration of the OAuth2 token revocation methods.
-
Field Summary
Fields Modifier and Type Field Description static StringPROFILE_IDID for this profile configuration.static StringPROTOCOL_URIOAuth2 Token Revocation URI.private Function<ProfileRequestContext,Duration>revocationLifetimeLookupStrategyLookup function to supply revocation lifetime.private Function<ProfileRequestContext,String>revocationMethodLookupStrategyWhich revocation method should be used when revoking a token.
-
Constructor Summary
Constructors Constructor Description OAuth2TokenRevocationConfiguration()Constructor.OAuth2TokenRevocationConfiguration(String profileId)Creates a new configuration instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DurationgetRevocationLifetime(ProfileRequestContext profileRequestContext)Get revocation lifetime.OAuth2TokenRevocationConfiguration.OAuth2TokenRevocationMethodgetRevocationMethod(ProfileRequestContext profileRequestContext)Get the revocation method used when revoking a token.voidsetRevocationLifetime(Duration lifetime)Set the lifetime of revocation.voidsetRevocationLifetimeLookupStrategy(Function<ProfileRequestContext,Duration> strategy)Set a lookup strategy for the revocation lifetime.voidsetRevocationMethod(OAuth2TokenRevocationConfiguration.OAuth2TokenRevocationMethod method)Set which revocation method should be used when revoking a token.voidsetRevocationMethodLookupStrategy(Function<ProfileRequestContext,String> strategy)Set strategy for looking up which revocation method should be used when revoking a token.-
Methods inherited from class net.shibboleth.oidc.profile.oauth2.config.AbstractOAuth2TokenValidatingConfiguration
getIssuedClaimsValidator, getIssuer, setIssuedClaimsValidator, setIssuedClaimsValidatorLookupStrategy, setIssuer, setIssuerLookupStrategy
-
Methods inherited from class net.shibboleth.oidc.profile.oauth2.config.AbstractOAuth2ClientAuthenticableProfileConfiguration
getAuthenticationFlows, getClaimsValidator, getDefaultAuthenticationMethods, getPostAuthenticationFlows, getProxyCount, getTokenEndpointAuthMethods, isForceAuthn, setAuthenticationFlows, setAuthenticationFlowsLookupStrategy, setClaimsValidator, setClaimsValidatorLookupStrategy, setDefaultAuthenticationMethods, setDefaultAuthenticationMethodsLookupStrategy, setForceAuthn, setForceAuthnPredicate, setPostAuthenticationFlows, setPostAuthenticationFlowsLookupStrategy, setProxyCount, setProxyCountLookupStrategy, setTokenEndpointAuthMethods, setTokenEndpointAuthMethodsLookupStrategy
-
Methods inherited from class net.shibboleth.idp.profile.config.AbstractConditionalProfileConfiguration
getActivationCondition, setActivationCondition
-
Methods inherited from class net.shibboleth.idp.profile.config.AbstractProfileConfiguration
equals, getDisallowedFeatures, getInboundInterceptorFlows, getOutboundInterceptorFlows, getSecurityConfiguration, hashCode, isFeatureDisallowed, setDisallowedFeatures, setDisallowedFeaturesLookupStrategy, setInboundFlowsLookupStrategy, setInboundInterceptorFlows, setInboundInterceptorFlowsLookupStrategy, setOutboundFlowsLookupStrategy, setOutboundInterceptorFlows, setOutboundInterceptorFlowsLookupStrategy, setSecurityConfiguration, setSecurityConfigurationLookupStrategy
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
doInitialize, getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.idp.authn.config.AuthenticationProfileConfiguration
isLocal
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
-
-
-
Field Detail
-
PROTOCOL_URI
@Nonnull @NotEmpty public static final String PROTOCOL_URI
OAuth2 Token Revocation URI.- See Also:
- Constant Field Values
-
PROFILE_ID
@Nonnull @NotEmpty public static final String PROFILE_ID
ID for this profile configuration.- See Also:
- Constant Field Values
-
revocationMethodLookupStrategy
@Nonnull private Function<ProfileRequestContext,String> revocationMethodLookupStrategy
Which revocation method should be used when revoking a token. Supported values are CHAIN and TOKEN. The default is CHAIN.
-
revocationLifetimeLookupStrategy
@Nonnull private Function<ProfileRequestContext,Duration> revocationLifetimeLookupStrategy
Lookup function to supply revocation lifetime.
-
-
Method Detail
-
setRevocationMethodLookupStrategy
public void setRevocationMethodLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)Set strategy for looking up which revocation method should be used when revoking a token.- Parameters:
strategy- What to set.- Since:
- 2.1.0
-
setRevocationMethod
public void setRevocationMethod(@Nonnull @NotEmpty OAuth2TokenRevocationConfiguration.OAuth2TokenRevocationMethod method)
Set which revocation method should be used when revoking a token.- Parameters:
method- What to set.- Since:
- 2.1.0
-
getRevocationMethod
public OAuth2TokenRevocationConfiguration.OAuth2TokenRevocationMethod getRevocationMethod(@Nullable ProfileRequestContext profileRequestContext)
Get the revocation method used when revoking a token.- Parameters:
profileRequestContext- profile request context.- Returns:
- The revocation method used when revoking a token.
- Since:
- 2.1.0
-
setRevocationLifetimeLookupStrategy
public void setRevocationLifetimeLookupStrategy(@Nullable Function<ProfileRequestContext,Duration> strategy)Set a lookup strategy for the revocation lifetime.- Parameters:
strategy- What to set.- Since:
- 2.1.0
-
getRevocationLifetime
@Positive @Nonnull public Duration getRevocationLifetime(@Nullable ProfileRequestContext profileRequestContext)
Get revocation lifetime.Defaults to 6 hours.
- Parameters:
profileRequestContext- profile request context- Returns:
- revocation lifetime
- Since:
- 2.1.0
-
-