Class OIDCAuthorizationConfiguration
- 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.AbstractOAuth2FlowAwareProfileConfiguration
-
- net.shibboleth.oidc.profile.config.AbstractOIDCSSOConfiguration
-
- net.shibboleth.oidc.profile.config.OIDCAuthorizationConfiguration
-
- All Implemented Interfaces:
net.shibboleth.idp.authn.config.AuthenticationProfileConfiguration,net.shibboleth.idp.profile.config.AttributeResolvingProfileConfiguration,net.shibboleth.idp.profile.config.ConditionalProfileConfiguration,net.shibboleth.idp.profile.config.OverriddenIssuerProfileConfiguration,net.shibboleth.idp.profile.config.ProfileConfiguration,OIDCProfileConfiguration,OAuth2ProfileConfiguration,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class OIDCAuthorizationConfiguration extends AbstractOIDCSSOConfiguration implements OIDCProfileConfiguration, net.shibboleth.idp.authn.config.AuthenticationProfileConfiguration, net.shibboleth.idp.profile.config.OverriddenIssuerProfileConfiguration
Profile configuration for the OpenID Connect authorization endpoint.It is also usable as a Token endpoint configuration if no non-OIDC use cases are needed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOIDCAuthorizationConfiguration.OIDCHttpRequestMethodEnumeration of the HTTP methods used in OIDC authentication requests.
-
Field Summary
Fields Modifier and Type Field Description private Predicate<ProfileRequestContext>acrRequestAlwaysEssentialPredicateWhether all acr claim requests should be treated as Essential.private Function<ProfileRequestContext,BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>>>authorizationCodeClaimsSetManipulationStrategyLookupStrategyLookup function to supply strategy bi-function for manipulating authorization code claims set.private Function<ProfileRequestContext,Duration>authorizeCodeLifetimeLookupStrategyLookup function to supply lifetime of authz code.private Function<ProfileRequestContext,Set<String>>deniedUserInfoAttributesLookupStrategyLookup function to supply attribute IDs to omit from UserInfo token.private Predicate<ProfileRequestContext>encodeConsentInTokensPredicateWhether to encode consent in authorization code and access/refresh tokens.private Function<ProfileRequestContext,Set<String>>encodedAttributesLookupStrategyLookup function to supply attribute IDs to embed in authorization code or access token.private Function<ProfileRequestContext,String>httpRequestMethodLookupStrategyWhich HTTP method should be used to issue OIDC authentication requests.private Predicate<ProfileRequestContext>includeIssuerInResponsePredicateWhether to include iss parameter in the authentication response.static StringPROFILE_IDID for this profile configuration.private Predicate<ProfileRequestContext>useRequestObjectPredicateWhether to encode authentication request parameters inside a JWT request object .-
Fields inherited from class net.shibboleth.oidc.profile.config.AbstractOIDCSSOConfiguration
PROTOCOL_URI
-
-
Constructor Summary
Constructors Constructor Description OIDCAuthorizationConfiguration()Constructor.OIDCAuthorizationConfiguration(String profileId)Creates a new configuration instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>>getAuthorizationCodeClaimsSetManipulationStrategy(ProfileRequestContext profileRequestContext)Get the bi-function for manipulating authorization code claims set.DurationgetAuthorizeCodeLifetime(ProfileRequestContext profileRequestContext)Get authz code lifetime.Set<String>getDeniedUserInfoAttributes(ProfileRequestContext profileRequestContext)Get the set of attribute IDs which should be omitted from the UserInfo token.Set<String>getEncodedAttributes(ProfileRequestContext profileRequestContext)Get the set of attribute IDs which should be encoded in encrypted form into the authorization code and/or access/refresh tokens to enable recovery on the back-channel.OIDCAuthorizationConfiguration.OIDCHttpRequestMethodgetHttpRequestMethod(ProfileRequestContext profileRequestContext)Get the HTTP request method for an authentication request.booleanisAcrRequestAlwaysEssential(ProfileRequestContext profileRequestContext)Get whether all acr claim requests should be treated as Essential.booleanisEncodeConsentInTokens(ProfileRequestContext profileRequestContext)Get whether to encode consent in authorization code and access/refresh tokens.booleanisIncludeIssuerInResponse(ProfileRequestContext profileRequestContext)Get whether to include iss parameter in the authentication response.booleanisUseRequestObject(ProfileRequestContext profileRequestContext)Should authentication request parameters should be passed in a single, self contained, JWT?voidsetAcrRequestAlwaysEssential(boolean flag)Set whether all acr claim requests should be treated as Essential.voidsetAcrRequestAlwaysEssentialPredicate(Predicate<ProfileRequestContext> condition)Set condition for whether all acr claim requests should be treated as Essential.voidsetAuthorizationCodeClaimsSetManipulationStrategy(BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>> strategy)Set the bi-function for manipulating authorization code claims set.voidsetAuthorizationCodeClaimsSetManipulationStrategyLookupStrategy(Function<ProfileRequestContext,BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>>> strategy)Set a lookup strategy for the bi-function for manipulating authorization code claims set.voidsetAuthorizeCodeLifetime(Duration lifetime)Set the lifetime of authz code.voidsetAuthorizeCodeLifetimeLookupStrategy(Function<ProfileRequestContext,Duration> strategy)Set a lookup strategy for the authz code lifetime.voidsetDeniedUserInfoAttributes(Collection<String> attributes)Set the set of attribute IDs which should be omitted from the UserInfo token.voidsetDeniedUserInfoAttributesLookupStrategy(Function<ProfileRequestContext,Set<String>> strategy)Set a lookup strategy for the set of attribute IDs which should be omitted from the UserInfo token.voidsetEncodeConsentInTokens(boolean flag)Set whether to encode consent in authorization code and access/refresh tokens.voidsetEncodeConsentInTokensPredicate(Predicate<ProfileRequestContext> condition)Set condition for whether to encode consent in authorization code and access/refresh tokens.voidsetEncodedAttributes(Collection<String> attributes)Set the set of attribute IDs which should be encoded in encrypted form into the authorization code and/or access/refresh tokens to enable recovery on the back-channel.voidsetEncodedAttributesLookupStrategy(Function<ProfileRequestContext,Set<String>> strategy)Set a lookup strategy for the attribute IDs which should be encoded in encrypted form into the authorization code and/or access/refresh tokens to enable recovery on the back-channel.voidsetHttpRequestMethod(OIDCAuthorizationConfiguration.OIDCHttpRequestMethod method)Set the HTTP request method for an authentication request.voidsetHttpRequestMethodLookupStrategy(Function<ProfileRequestContext,String> strategy)Set a lookup strategy to determine the HTTP request method for an authentication request.voidsetIncludeIssuerInResponse(boolean flag)Set whether to include iss parameter in the authentication response.voidsetIncludeIssuerInResponsePredicate(Predicate<ProfileRequestContext> condition)Set condition for whether to include iss parameter in the authentication response.voidsetUseRequestObject(boolean flag)Set whether the authentication request parameters should be passed in a single, self contained, JWT.voidsetUseRequestObjectPredicate(Predicate<ProfileRequestContext> condition)Set condition for whether the authentication request parameters should be passed in a single, self contained, JWT.-
Methods inherited from class net.shibboleth.oidc.profile.config.AbstractOIDCSSOConfiguration
getAccessTokenClaimsSetManipulationStrategy, getAccessTokenLifetime, getAccessTokenType, getAdditionalAudiencesForIdToken, getAlwaysIncludedAttributes, getIDTokenLifetime, getIDTokenManipulationStrategy, getIssuer, getRefreshTokenLifetime, isAllowPKCEPlain, isEncryptionOptional, isForcePKCE, isResolveAttributes, setAccessTokenClaimsSetManipulationStrategy, setAccessTokenClaimsSetManipulationStrategyLookupStrategy, setAccessTokenLifetime, setAccessTokenLifetimeLookupStrategy, setAccessTokenType, setAccessTokenTypeLookupStrategy, setAdditionalAudiencesForIdToken, setAdditionalAudiencesForIdTokenLookupStrategy, setAllowPKCEPlain, setAllowPKCEPlainPredicate, setAlwaysIncludedAttributes, setAlwaysIncludedAttributesLookupStrategy, setEncryptionOptional, setEncryptionOptionalPredicate, setForcePKCE, setForcePKCEPredicate, setIDTokenLifetime, setIDTokenLifetimeLookupStrategy, setIDTokenManipulationStrategy, setIDTokenManipulationStrategyLookupStrategy, setIssuer, setIssuerLookupStrategy, setRefreshTokenLifetime, setRefreshTokenLifetimeLookupStrategy, setResolveAttributes, setResolveAttributesPredicate
-
Methods inherited from class net.shibboleth.oidc.profile.oauth2.config.AbstractOAuth2FlowAwareProfileConfiguration
isAuthorizationCodeFlowEnabled, isHybridFlowEnabled, isImplicitFlowEnabled, isRefreshTokensEnabled, setAuthorizationCodeFlowEnabled, setAuthorizationCodeFlowEnabledPredicate, setHybridFlowEnabled, setHybridFlowEnabledPredicate, setImplicitFlowEnabled, setImplicitFlowEnabledPredicate, setRefreshTokensEnabled, setRefreshTokensEnabledPredicate
-
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
getAuthenticationFlows, getDefaultAuthenticationMethods, getPostAuthenticationFlows, getProxyCount, isForceAuthn, isLocal
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
-
-
-
Field Detail
-
PROFILE_ID
@Nonnull @NotEmpty public static final String PROFILE_ID
ID for this profile configuration.- See Also:
- Constant Field Values
-
acrRequestAlwaysEssentialPredicate
@Nonnull private Predicate<ProfileRequestContext> acrRequestAlwaysEssentialPredicate
Whether all acr claim requests should be treated as Essential.
-
encodeConsentInTokensPredicate
@Nonnull private Predicate<ProfileRequestContext> encodeConsentInTokensPredicate
Whether to encode consent in authorization code and access/refresh tokens.
-
authorizeCodeLifetimeLookupStrategy
@Nonnull private Function<ProfileRequestContext,Duration> authorizeCodeLifetimeLookupStrategy
Lookup function to supply lifetime of authz code.
-
encodedAttributesLookupStrategy
@Nonnull private Function<ProfileRequestContext,Set<String>> encodedAttributesLookupStrategy
Lookup function to supply attribute IDs to embed in authorization code or access token.
-
useRequestObjectPredicate
@Nonnull private Predicate<ProfileRequestContext> useRequestObjectPredicate
Whether to encode authentication request parameters inside a JWT request object .
-
deniedUserInfoAttributesLookupStrategy
@Nonnull private Function<ProfileRequestContext,Set<String>> deniedUserInfoAttributesLookupStrategy
Lookup function to supply attribute IDs to omit from UserInfo token.
-
includeIssuerInResponsePredicate
@Nonnull private Predicate<ProfileRequestContext> includeIssuerInResponsePredicate
Whether to include iss parameter in the authentication response.
-
httpRequestMethodLookupStrategy
@Nonnull private Function<ProfileRequestContext,String> httpRequestMethodLookupStrategy
Which HTTP method should be used to issue OIDC authentication requests. Supported values are POST and GET. The default is GET.
-
authorizationCodeClaimsSetManipulationStrategyLookupStrategy
@Nonnull private Function<ProfileRequestContext,BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>>> authorizationCodeClaimsSetManipulationStrategyLookupStrategy
Lookup function to supply strategy bi-function for manipulating authorization code claims set.
-
-
Method Detail
-
isAcrRequestAlwaysEssential
public boolean isAcrRequestAlwaysEssential(@Nullable ProfileRequestContext profileRequestContext)Get whether all acr claim requests should be treated as Essential.- Parameters:
profileRequestContext- profile request context- Returns:
- whether all acr claim requests should be treated as Essential
-
setAcrRequestAlwaysEssential
public void setAcrRequestAlwaysEssential(boolean flag)
Set whether all acr claim requests should be treated as Essential.- Parameters:
flag- flag to set
-
setAcrRequestAlwaysEssentialPredicate
public void setAcrRequestAlwaysEssentialPredicate(@Nonnull Predicate<ProfileRequestContext> condition)Set condition for whether all acr claim requests should be treated as Essential.- Parameters:
condition- condition to set
-
isUseRequestObject
public boolean isUseRequestObject(@Nullable ProfileRequestContext profileRequestContext)Should authentication request parameters should be passed in a single, self contained, JWT?- Parameters:
profileRequestContext- the profile request context- Returns:
- whether authentication request parameters should be passed in a single, self contained, JWT
-
setUseRequestObject
public void setUseRequestObject(boolean flag)
Set whether the authentication request parameters should be passed in a single, self contained, JWT.- Parameters:
flag- flag to set
-
setUseRequestObjectPredicate
public void setUseRequestObjectPredicate(@Nonnull Predicate<ProfileRequestContext> condition)Set condition for whether the authentication request parameters should be passed in a single, self contained, JWT.- Parameters:
condition- condition to set
-
isEncodeConsentInTokens
public boolean isEncodeConsentInTokens(@Nullable ProfileRequestContext profileRequestContext)Get whether to encode consent in authorization code and access/refresh tokens.- Parameters:
profileRequestContext- profile request context- Returns:
- whether to encode consent in authorization code and access/refresh tokens
-
setEncodeConsentInTokens
public void setEncodeConsentInTokens(boolean flag)
Set whether to encode consent in authorization code and access/refresh tokens.- Parameters:
flag- flag to set
-
setEncodeConsentInTokensPredicate
public void setEncodeConsentInTokensPredicate(@Nonnull Predicate<ProfileRequestContext> condition)Set condition for whether to encode consent in authorization code and access/refresh tokens.- Parameters:
condition- condition to set
-
getAuthorizeCodeLifetime
@Positive @Nonnull public Duration getAuthorizeCodeLifetime(@Nullable ProfileRequestContext profileRequestContext)
Get authz code lifetime.Defaults to 5 minutes.
- Parameters:
profileRequestContext- profile request context- Returns:
- authz code lifetime
-
setAuthorizeCodeLifetime
public void setAuthorizeCodeLifetime(@Positive @Nonnull Duration lifetime)
Set the lifetime of authz code.- Parameters:
lifetime- lifetime of authz code
-
setAuthorizeCodeLifetimeLookupStrategy
public void setAuthorizeCodeLifetimeLookupStrategy(@Nonnull Function<ProfileRequestContext,Duration> strategy)Set a lookup strategy for the authz code lifetime.- Parameters:
strategy- lookup strategy
-
setHttpRequestMethodLookupStrategy
public void setHttpRequestMethodLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)Set a lookup strategy to determine the HTTP request method for an authentication request.- Parameters:
strategy- the strategy to set.
-
setHttpRequestMethod
public void setHttpRequestMethod(@Nonnull @NotEmpty OIDCAuthorizationConfiguration.OIDCHttpRequestMethod method)
Set the HTTP request method for an authentication request.- Parameters:
method- the HTTP method to set, either POST or GET.
-
getHttpRequestMethod
public OIDCAuthorizationConfiguration.OIDCHttpRequestMethod getHttpRequestMethod(@Nullable ProfileRequestContext profileRequestContext)
Get the HTTP request method for an authentication request.- Parameters:
profileRequestContext- profile request context- Returns:
- the HTTP request method
-
getEncodedAttributes
@Nonnull @NonnullElements @NotLive public Set<String> getEncodedAttributes(@Nullable ProfileRequestContext profileRequestContext)
Get the set of attribute IDs which should be encoded in encrypted form into the authorization code and/or access/refresh tokens to enable recovery on the back-channel.- Parameters:
profileRequestContext- profile request context- Returns:
- the attribute IDs to encode
-
setEncodedAttributes
public void setEncodedAttributes(@Nullable @NonnullElements Collection<String> attributes)
Set the set of attribute IDs which should be encoded in encrypted form into the authorization code and/or access/refresh tokens to enable recovery on the back-channel.- Parameters:
attributes- the attribute IDs to encode
-
setEncodedAttributesLookupStrategy
public void setEncodedAttributesLookupStrategy(@Nonnull Function<ProfileRequestContext,Set<String>> strategy)Set a lookup strategy for the attribute IDs which should be encoded in encrypted form into the authorization code and/or access/refresh tokens to enable recovery on the back-channel.- Parameters:
strategy- lookup strategy
-
getDeniedUserInfoAttributes
@Nonnull @NonnullElements @NotLive public Set<String> getDeniedUserInfoAttributes(@Nullable ProfileRequestContext profileRequestContext)
Get the set of attribute IDs which should be omitted from the UserInfo token.Default behavior is to include all claims, but omiited claims also affect the set that may need to be embedded for recovery into the access/refresh tokens.
- Parameters:
profileRequestContext- profile request context- Returns:
- the attribute IDs to omit from UserInfo token
-
setDeniedUserInfoAttributes
public void setDeniedUserInfoAttributes(@Nullable @NonnullElements Collection<String> attributes)
Set the set of attribute IDs which should be omitted from the UserInfo token.Default behavior is to include all claims, but omiited claims also affect the set that may need to be embedded for recovery into the access/refresh tokens.
- Parameters:
attributes- the attribute IDs to omit from UserInfo token
-
setDeniedUserInfoAttributesLookupStrategy
public void setDeniedUserInfoAttributesLookupStrategy(@Nonnull Function<ProfileRequestContext,Set<String>> strategy)Set a lookup strategy for the set of attribute IDs which should be omitted from the UserInfo token.- Parameters:
strategy- lookup strategy
-
isIncludeIssuerInResponse
public boolean isIncludeIssuerInResponse(@Nullable ProfileRequestContext profileRequestContext)Get whether to include iss parameter in the authentication response.- Parameters:
profileRequestContext- profile request context- Returns:
- whether to include iss parameter in the authentication response
- Since:
- 2.1.0
-
setIncludeIssuerInResponse
public void setIncludeIssuerInResponse(boolean flag)
Set whether to include iss parameter in the authentication response.- Parameters:
flag- flag to set- Since:
- 2.1.0
-
setIncludeIssuerInResponsePredicate
public void setIncludeIssuerInResponsePredicate(@Nonnull Predicate<ProfileRequestContext> condition)Set condition for whether to include iss parameter in the authentication response.- Parameters:
condition- condition to set- Since:
- 2.1.0
-
getAuthorizationCodeClaimsSetManipulationStrategy
@Nonnull public BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>> getAuthorizationCodeClaimsSetManipulationStrategy(@Nullable ProfileRequestContext profileRequestContext)
Get the bi-function for manipulating authorization code claims set.- Parameters:
profileRequestContext- profile request context- Returns:
- the bi-function for manipulating authorization code claims set
- Since:
- 2.1.0
-
setAuthorizationCodeClaimsSetManipulationStrategy
public void setAuthorizationCodeClaimsSetManipulationStrategy(@Nullable BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>> strategy)Set the bi-function for manipulating authorization code claims set.- Parameters:
strategy- bi-function for manipulating authorization code claims set- Since:
- 2.1.0
-
setAuthorizationCodeClaimsSetManipulationStrategyLookupStrategy
public void setAuthorizationCodeClaimsSetManipulationStrategyLookupStrategy(@Nonnull Function<ProfileRequestContext,BiFunction<ProfileRequestContext,Map<String,Object>,Map<String,Object>>> strategy)Set a lookup strategy for the bi-function for manipulating authorization code claims set.- Parameters:
strategy- lookup strategy- Since:
- 2.1.0
-
-