Class OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties
java.lang.Object
io.micronaut.security.token.propagation.AbstractOutgoingRequestProcessorMatcher
io.micronaut.security.oauth2.configuration.OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,io.micronaut.http.util.OutgoingRequestProcessorMatcher
,ClientCredentialsConfiguration
- Enclosing class:
- OauthClientConfigurationProperties
@Requires(classes=io.micronaut.http.util.OutgoingRequestProcessorMatcher.class)
@ConfigurationProperties("client-credentials")
public static class OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties
extends AbstractOutgoingRequestProcessorMatcher
implements ClientCredentialsConfiguration
Client credentials configuration.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Client credentials http header token propagation configuration. -
Field Summary
Fields inherited from class io.micronaut.security.token.propagation.AbstractOutgoingRequestProcessorMatcher
serviceIdPattern, serviceIdRegex, uriPattern, uriRegex
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull Duration
getScope()
boolean
void
setAdditionalRequestParams
(Map<String, String> additionalRequestParams) Additional parameters included in the client-credentials flow.void
setAdvancedExpiration
(@NonNull Duration advancedExpiration) void
setEnabled
(boolean enabled) EnablesClientCredentialsClient
.void
setHeaderPropagation
(@NonNull OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties.HeaderTokenPropagatorConfigurationProperties headerPropagation) Sets the Http Header Client Credentials Token Propagator configuration.void
Scope to be requested in the client credentials request.Methods inherited from class io.micronaut.security.token.propagation.AbstractOutgoingRequestProcessorMatcher
getServiceIdPattern, getServiceIdRegex, getUriPattern, getUriRegex, setServiceIdRegex, setUriRegex
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.util.OutgoingRequestProcessorMatcher
getServiceIdPattern, getUriPattern
-
Field Details
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
-
Constructor Details
-
ClientCredentialsConfigurationProperties
public ClientCredentialsConfigurationProperties()
-
-
Method Details
-
getAdvancedExpiration
- Specified by:
getAdvancedExpiration
in interfaceClientCredentialsConfiguration
- Returns:
- The amount of time for a token obtained via client credentials grant to be considered expired prior to its expiration date.
-
getHeaderPropagation
@NonNull public @NonNull Optional<ClientCredentialsHeaderTokenPropagatorConfiguration> getHeaderPropagation()- Specified by:
getHeaderPropagation
in interfaceClientCredentialsConfiguration
-
setHeaderPropagation
public void setHeaderPropagation(@NonNull @NonNull OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties.HeaderTokenPropagatorConfigurationProperties headerPropagation) Sets the Http Header Client Credentials Token Propagator configuration.- Parameters:
headerPropagation
- client credentials header propagation.
-
setAdvancedExpiration
- Parameters:
advancedExpiration
- Number of seconds for a token obtained via client credentials grant to be considered expired prior to its expiration date. Default value (30 seconds).
-
getScope
- Specified by:
getScope
in interfaceClientCredentialsConfiguration
- Returns:
- Scope to be requested in the client credentials request.
-
setScope
Scope to be requested in the client credentials request. Defaults to none.- Parameters:
scope
- Scope to be requested in the client credentials request
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) EnablesClientCredentialsClient
. Default value true- Parameters:
enabled
- enabled flag
-
getAdditionalRequestParams
- Specified by:
getAdditionalRequestParams
in interfaceClientCredentialsConfiguration
- Returns:
- a Map of additional request parameters
-
setAdditionalRequestParams
public void setAdditionalRequestParams(@MapFormat(transformation=FLAT) Map<String, String> additionalRequestParams) Additional parameters included in the client-credentials flow.- Parameters:
additionalRequestParams
- Map of additional request parameters to include in client-credentials flow
-