@ConfigurationProperties(value="client-credentials") public static class OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties extends java.lang.Object implements ClientCredentialsConfiguration
Modifier and Type | Class and Description |
---|---|
static class |
OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties.HeaderTokenPropagatorConfigurationProperties
Client credentials http header token propagation configuration.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
Constructor and Description |
---|
ClientCredentialsConfigurationProperties() |
Modifier and Type | Method and Description |
---|---|
java.time.Duration |
getAdvancedExpiration() |
java.util.Optional<ClientCredentialsHeaderTokenPropagatorConfiguration> |
getHeaderPropagation() |
java.util.Optional<java.lang.String> |
getScope() |
java.util.regex.Pattern |
getServiceIdPattern() |
java.lang.String |
getServiceIdRegex() |
java.util.regex.Pattern |
getUriPattern() |
java.lang.String |
getUriRegex() |
boolean |
isEnabled() |
void |
setAdvancedExpiration(java.time.Duration advancedExpiration) |
void |
setEnabled(boolean enabled)
Enables
ClientCredentialsClient . |
void |
setHeaderPropagation(OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties.HeaderTokenPropagatorConfigurationProperties headerPropagation)
Sets the Http Header Client Credentials Token Propagator configuration.
|
void |
setScope(java.lang.String scope)
Scope to be requested in the client credentials request.
|
void |
setServiceIdRegex(java.lang.String serviceIdRegex) |
void |
setUriRegex(java.lang.String uriRegex) |
public static final boolean DEFAULT_ENABLED
public ClientCredentialsConfigurationProperties()
@NonNull public java.time.Duration getAdvancedExpiration()
getAdvancedExpiration
in interface ClientCredentialsConfiguration
@NonNull public java.util.Optional<ClientCredentialsHeaderTokenPropagatorConfiguration> getHeaderPropagation()
getHeaderPropagation
in interface ClientCredentialsConfiguration
public void setHeaderPropagation(@NonNull OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties.HeaderTokenPropagatorConfigurationProperties headerPropagation)
headerPropagation
- client credentials header propagation.public void setAdvancedExpiration(@NonNull java.time.Duration advancedExpiration)
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).public java.lang.String getServiceIdRegex()
public void setServiceIdRegex(java.lang.String serviceIdRegex)
serviceIdRegex
- A regular expression to match the service id.public java.lang.String getUriRegex()
public void setUriRegex(java.lang.String uriRegex)
uriRegex
- A regular expression to match the URI.public java.util.regex.Pattern getServiceIdPattern()
getServiceIdPattern
in interface io.micronaut.http.util.OutgointRequestProcessorMatcher
public java.util.regex.Pattern getUriPattern()
getUriPattern
in interface io.micronaut.http.util.OutgointRequestProcessorMatcher
@NonNull public java.util.Optional<java.lang.String> getScope()
getScope
in interface ClientCredentialsConfiguration
public void setScope(java.lang.String scope)
scope
- Scope to be requested in the client credentials requestpublic boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
public void setEnabled(boolean enabled)
ClientCredentialsClient
. Default value trueenabled
- enabled flag