Class AbstractOAuth2ClientAuthenticableProfileConfiguration
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.profile.config.AbstractProfileConfiguration
net.shibboleth.profile.config.AbstractConditionalProfileConfiguration
net.shibboleth.idp.profile.config.AbstractInterceptorAwareProfileConfiguration
net.shibboleth.oidc.profile.oauth2.config.impl.AbstractOAuth2ClientAuthenticableProfileConfiguration
- All Implemented Interfaces:
AuthenticationProfileConfiguration,InterceptorAwareProfileConfiguration,OAuth2ClientAuthenticableClientProfileConfiguration,OAuth2ClientAuthenticableProfileConfiguration,OAuth2ProfileConfiguration,ConditionalProfileConfiguration,ProfileConfiguration,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
- Direct Known Subclasses:
AbstractOAuth2FlowAwareProfileConfiguration,AbstractOAuth2TokenValidatingConfiguration
public abstract class AbstractOAuth2ClientAuthenticableProfileConfiguration
extends AbstractInterceptorAwareProfileConfiguration
implements OAuth2ClientAuthenticableProfileConfiguration, OAuth2ClientAuthenticableClientProfileConfiguration
Base class for OAuth profile configurations that support OAuth-defined client authentication methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,Set<String>> Lookup function to supply authentication flows.private Function<ProfileRequestContext,ClaimsValidator> Validation of JWT claims for subset of client auth methods.Lookup function to retrieve a client credential from the given profile request context.private Function<ProfileRequestContext,String> Lookup function to retrieve the client_id from the given profile request context.private Function<ProfileRequestContext,Collection<Principal>> Lookup function to supply default authentication methods.private Predicate<ProfileRequestContext>Whether to mandate forced authentication for the request.private Function<ProfileRequestContext,Collection<String>> Lookup function to supply post authentication flows.private Function<ProfileRequestContext,Integer> Lookup function to supply proxyCount property.private Function<ProfileRequestContext,String> The token endpoint authentication method to use with an upstream OpenID Provider.private Function<ProfileRequestContext,Set<String>> Enabled token endpoint authentication methods.Lookup function to retrieve the policy for validating claims of an unregistered client.Fields inherited from interface net.shibboleth.profile.config.ProfileConfiguration
DEFAULT_DISALLOWED_FEATURES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptiongetAuthenticationFlows(ProfileRequestContext profileRequestContext) getClaimsValidator(ProfileRequestContext profileRequestContext) Get theClaimsValidatorto apply to JWT-based client authentication.getClientCredential(ProfileRequestContext profileRequestContext) Get the client credential for the given context.getClientId(ProfileRequestContext profileRequestContext) Get the client_id appropriate for the given context.getDefaultAuthenticationMethods(ProfileRequestContext profileRequestContext) getPostAuthenticationFlows(ProfileRequestContext profileRequestContext) getProxyCount(ProfileRequestContext profileRequestContext) getTokenEndpointAuthMethod(ProfileRequestContext profileRequestContext) Get the token endpoint authentication method to use with an OpenID Provider.getTokenEndpointAuthMethods(ProfileRequestContext profileRequestContext) Get the enabled token endpoint authentication methods.getUnregisteredClientPolicy(ProfileRequestContext profileRequestContext) Get the policy for validating unregistered clients.booleanisForceAuthn(ProfileRequestContext profileRequestContext) voidsetAuthenticationFlows(Collection<String> flows) Set the authentication flows to use.voidSet a lookup strategy for the authentication flows to use.voidsetClaimsValidator(ClaimsValidator validator) Set theClaimsValidatorto apply to JWT-based client authentication.voidSet a lookup strategy for theClaimsValidatorto apply to JWT-based client authentication.voidsetClientCredential(ClientSecretCredential clientCredential) Set a fixed client credential to use no matter what the context/request.voidSet the client credential lookup strategy.voidsetClientId(String clientId) Set a fixed client_id to use no matter what the context/request.voidSet the strategy to locate a client_id.voidsetDefaultAuthenticationMethods(Collection<Principal> contexts) Set the default authentication contexts to use, expressed as custom principals.voidsetDefaultAuthenticationMethodsLookupStrategy(Function<ProfileRequestContext, Collection<Principal>> strategy) Set a lookup strategy for the authentication contexts to use, expressed as custom principals.voidsetForceAuthn(boolean flag) Set whether a fresh user presence proof should be required for this request.voidsetForceAuthnPredicate(Predicate<ProfileRequestContext> condition) Set a condition to determine whether a fresh user presence proof should be required for this request.voidSet the ordered collection of post-authentication interceptor flows to enable.voidsetPostAuthenticationFlowsLookupStrategy(Function<ProfileRequestContext, Collection<String>> strategy) Set a lookup strategy for the post-authentication interceptor flows to enable.voidsetProxyCount(Integer count) Sets the maximum number of times an assertion may be proxied outbound and/or the maximum number of hops between the relying party and a proxied authentication authority inbound.voidSet a lookup strategy for the maximum number of times an assertion may be proxied outbound and/or the maximum number of hops between the relying party and a proxied authentication authority inbound.voidsetTokenEndpointAuthMethod(String method) Set the enabled token endpoint authentication method to use with an upstream OpenID Provider.voidSet a lookup strategy to find the enabled token endpoint authentication method to use with an upstream OpenID Provider.voidsetTokenEndpointAuthMethods(Collection<String> methods) Set the enabled token endpoint authentication methods.voidSet a lookup strategy for the enabled token endpoint authentication methods.voidSets the policy for validating unregistered clients.voidsetUnregisteredClientPolicyLookupStrategy(Function<ProfileRequestContext, Map<String, UnregisteredClientPolicy>> strategy) Set a lookup strategy for the policy for validating unregistered clients.Methods inherited from class net.shibboleth.idp.profile.config.AbstractInterceptorAwareProfileConfiguration
getInboundInterceptorFlows, getOutboundInterceptorFlows, setInboundInterceptorFlows, setInboundInterceptorFlowsLookupStrategy, setOutboundInterceptorFlows, setOutboundInterceptorFlowsLookupStrategyMethods inherited from class net.shibboleth.profile.config.AbstractConditionalProfileConfiguration
getActivationCondition, setActivationConditionMethods inherited from class net.shibboleth.profile.config.AbstractProfileConfiguration
equals, getDisallowedFeatures, getSecurityConfiguration, hashCode, isFeatureDisallowed, setDisallowedFeatures, setDisallowedFeaturesLookupStrategy, setSecurityConfiguration, setSecurityConfigurationLookupStrategyMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.idp.authn.config.AuthenticationProfileConfiguration
isLocalMethods inherited from interface net.shibboleth.profile.config.ConditionalProfileConfiguration
getActivationConditionMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.profile.config.ProfileConfiguration
getDisallowedFeatures, getSecurityConfiguration, isFeatureDisallowed
-
Field Details
-
tokenEndpointAuthMethodsLookupStrategy
Enabled token endpoint authentication methods. -
tokenEndpointAuthMethodLookupStrategy
The token endpoint authentication method to use with an upstream OpenID Provider. -
claimsValidatorLookupStrategy
Validation of JWT claims for subset of client auth methods. -
forceAuthnPredicate
Whether to mandate forced authentication for the request. -
proxyCountLookupStrategy
Lookup function to supply proxyCount property. -
defaultAuthenticationContextsLookupStrategy
@Nonnull private Function<ProfileRequestContext,Collection<Principal>> defaultAuthenticationContextsLookupStrategyLookup function to supply default authentication methods. -
authenticationFlowsLookupStrategy
Lookup function to supply authentication flows. -
postAuthenticationFlowsLookupStrategy
@Nonnull private Function<ProfileRequestContext,Collection<String>> postAuthenticationFlowsLookupStrategyLookup function to supply post authentication flows. -
clientCredentialLookupStrategy
@Nonnull private Function<ProfileRequestContext,ClientSecretCredential> clientCredentialLookupStrategyLookup function to retrieve a client credential from the given profile request context. -
clientIdLookupStrategy
Lookup function to retrieve the client_id from the given profile request context. -
unregisteredClientPolicyLookupStrategy
@Nonnull private Function<ProfileRequestContext,Map<String, unregisteredClientPolicyLookupStrategyUnregisteredClientPolicy>> Lookup function to retrieve the policy for validating claims of an unregistered client.
-
-
Constructor Details
-
Method Details
-
getTokenEndpointAuthMethods
@Nonnull @NonnullElements @NotLive @Unmodifiable public Set<String> getTokenEndpointAuthMethods(@Nullable ProfileRequestContext profileRequestContext) Get the enabled token endpoint authentication methods.- Specified by:
getTokenEndpointAuthMethodsin interfaceOAuth2ClientAuthenticableProfileConfiguration- Parameters:
profileRequestContext- profile request context- Returns:
- enabled token endpoint authentication methods
-
setTokenEndpointAuthMethods
Set the enabled token endpoint authentication methods.- Parameters:
methods- What to set.
-
setTokenEndpointAuthMethodsLookupStrategy
public void setTokenEndpointAuthMethodsLookupStrategy(@Nonnull Function<ProfileRequestContext, Set<String>> strategy) Set a lookup strategy for the enabled token endpoint authentication methods.- Parameters:
strategy- lookup strategy
-
getTokenEndpointAuthMethod
@Nullable public String getTokenEndpointAuthMethod(@Nullable ProfileRequestContext profileRequestContext) Get the token endpoint authentication method to use with an OpenID Provider.- Specified by:
getTokenEndpointAuthMethodin interfaceOAuth2ClientAuthenticableClientProfileConfiguration- Parameters:
profileRequestContext- the profile request context- Returns:
- the token endpoint authentication method to use.
-
setTokenEndpointAuthMethod
Set the enabled token endpoint authentication method to use with an upstream OpenID Provider.- Parameters:
method- the token endpoint authentication method to set.- Since:
- 2.2.0
-
setTokenEndpointAuthMethodLookupStrategy
public void setTokenEndpointAuthMethodLookupStrategy(@Nonnull Function<ProfileRequestContext, String> strategy) Set a lookup strategy to find the enabled token endpoint authentication method to use with an upstream OpenID Provider.- Parameters:
strategy- lookup strategy- Since:
- 2.2.0
-
getClaimsValidator
@Nullable public ClaimsValidator getClaimsValidator(@Nullable ProfileRequestContext profileRequestContext) Get theClaimsValidatorto apply to JWT-based client authentication.- Specified by:
getClaimsValidatorin interfaceOAuth2ClientAuthenticableProfileConfiguration- Parameters:
profileRequestContext- current profile request context- Returns:
- the validator to use
- Since:
- 3.1.0
-
setClaimsValidator
Set theClaimsValidatorto apply to JWT-based client authentication.- Parameters:
validator- validator to use- Since:
- 3.1.0
-
setClaimsValidatorLookupStrategy
public void setClaimsValidatorLookupStrategy(@Nonnull Function<ProfileRequestContext, ClaimsValidator> strategy) Set a lookup strategy for theClaimsValidatorto apply to JWT-based client authentication.- Parameters:
strategy- lookup strategy- Since:
- 3.1.0
-
isForceAuthn
- Specified by:
isForceAuthnin interfaceAuthenticationProfileConfiguration
-
setForceAuthn
public void setForceAuthn(boolean flag) Set whether a fresh user presence proof should be required for this request.- Parameters:
flag- flag to set
-
setForceAuthnPredicate
Set a condition to determine whether a fresh user presence proof should be required for this request.- Parameters:
condition- condition to set
-
getProxyCount
- Specified by:
getProxyCountin interfaceAuthenticationProfileConfiguration
-
setProxyCount
Sets the maximum number of times an assertion may be proxied outbound and/or the maximum number of hops between the relying party and a proxied authentication authority inbound.- Parameters:
count- proxy count
-
setProxyCountLookupStrategy
Set a lookup strategy for the maximum number of times an assertion may be proxied outbound and/or the maximum number of hops between the relying party and a proxied authentication authority inbound.- Parameters:
strategy- lookup strategy
-
getAuthenticationFlows
@Nonnull @NonnullElements @NotLive @Unmodifiable public Set<String> getAuthenticationFlows(@Nullable ProfileRequestContext profileRequestContext) - Specified by:
getAuthenticationFlowsin interfaceAuthenticationProfileConfiguration
-
setAuthenticationFlows
Set the authentication flows to use.- Parameters:
flows- flow identifiers to use
-
setAuthenticationFlowsLookupStrategy
public void setAuthenticationFlowsLookupStrategy(@Nonnull Function<ProfileRequestContext, Set<String>> strategy) Set a lookup strategy for the authentication flows to use.- Parameters:
strategy- lookup strategy
-
getPostAuthenticationFlows
@Nonnull @NonnullElements @NotLive @Unmodifiable public List<String> getPostAuthenticationFlows(@Nullable ProfileRequestContext profileRequestContext) - Specified by:
getPostAuthenticationFlowsin interfaceAuthenticationProfileConfiguration
-
setPostAuthenticationFlows
Set the ordered collection of post-authentication interceptor flows to enable.- Parameters:
flows- flow identifiers to enable
-
setPostAuthenticationFlowsLookupStrategy
public void setPostAuthenticationFlowsLookupStrategy(@Nonnull Function<ProfileRequestContext, Collection<String>> strategy) Set a lookup strategy for the post-authentication interceptor flows to enable.- Parameters:
strategy- lookup strategy
-
getDefaultAuthenticationMethods
@Nonnull @NonnullElements @NotLive @Unmodifiable public List<Principal> getDefaultAuthenticationMethods(@Nullable ProfileRequestContext profileRequestContext) - Specified by:
getDefaultAuthenticationMethodsin interfaceAuthenticationProfileConfiguration
-
setDefaultAuthenticationMethods
public void setDefaultAuthenticationMethods(@Nullable @NonnullElements Collection<Principal> contexts) Set the default authentication contexts to use, expressed as custom principals.- Parameters:
contexts- default authentication contexts to use
-
setDefaultAuthenticationMethodsLookupStrategy
public void setDefaultAuthenticationMethodsLookupStrategy(@Nonnull Function<ProfileRequestContext, Collection<Principal>> strategy) Set a lookup strategy for the authentication contexts to use, expressed as custom principals.- Parameters:
strategy- lookup strategy
-
setClientCredentialLookupStrategy
public void setClientCredentialLookupStrategy(@Nonnull Function<ProfileRequestContext, ClientSecretCredential> strategy) Set the client credential lookup strategy.- Parameters:
strategy- the strategy to use- Since:
- 2.2.0
-
setClientCredential
Set a fixed client credential to use no matter what the context/request.- Parameters:
clientCredential- the static client credential to use- Since:
- 2.2.0
-
getClientCredential
public ClientSecretCredential getClientCredential(@Nullable ProfileRequestContext profileRequestContext) Get the client credential for the given context. Typically a client_secret associated with the current client_id.- Specified by:
getClientCredentialin interfaceOAuth2ClientAuthenticableClientProfileConfiguration- Parameters:
profileRequestContext- the profile request context- Returns:
- the client credential
-
setClientIdLookupStrategy
Set the strategy to locate a client_id.- Parameters:
strategy- the strategy to use- Since:
- 2.2.0
-
setClientId
Set a fixed client_id to use no matter what the context/request.- Parameters:
clientId- the static clientId to use- Since:
- 2.2.0
-
getClientId
Get the client_id appropriate for the given context. Typically that associated with the chosen OpenID Connect Provider.- Specified by:
getClientIdin interfaceOAuth2ClientAuthenticableClientProfileConfiguration- Parameters:
profileRequestContext- the profile request context- Returns:
- the client_id
-
getUnregisteredClientPolicy
@Nonnull @Unmodifiable public Map<String,UnregisteredClientPolicy> getUnregisteredClientPolicy(@Nullable ProfileRequestContext profileRequestContext) Get the policy for validating unregistered clients.- Specified by:
getUnregisteredClientPolicyin interfaceOAuth2ClientAuthenticableProfileConfiguration- Parameters:
profileRequestContext- profile request context- Returns:
- the map of policies for validating claims of an unregistered client
-
setUnregisteredClientPolicy
Sets the policy for validating unregistered clients.- Parameters:
policy- policy to set- Since:
- 3.0.0
-
setUnregisteredClientPolicyLookupStrategy
public void setUnregisteredClientPolicyLookupStrategy(@Nonnull Function<ProfileRequestContext, Map<String, UnregisteredClientPolicy>> strategy) Set a lookup strategy for the policy for validating unregistered clients.- Parameters:
strategy- lookup strategy- Since:
- 3.0.0
-