Class OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties.HeaderTokenPropagatorConfigurationProperties
java.lang.Object
io.micronaut.security.oauth2.configuration.OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties.HeaderTokenPropagatorConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,ClientCredentialsHeaderTokenPropagatorConfiguration
@ConfigurationProperties("header-propagation")
public static class OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties.HeaderTokenPropagatorConfigurationProperties
extends Object
implements ClientCredentialsHeaderTokenPropagatorConfiguration
Client credentials http header token propagation configuration.
-
Field Summary
Fields inherited from interface io.micronaut.security.oauth2.client.clientcredentials.propagation.ClientCredentialsHeaderTokenPropagatorConfiguration
DEFAULT_ENABLED, DEFAULT_HEADER_NAME, DEFAULT_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setEnabled
(boolean enabled) void
setHeaderName
(String headerName) Http Header to be used to propagate the token.void
Value prefix for Http Header.
-
Constructor Details
-
HeaderTokenPropagatorConfigurationProperties
public HeaderTokenPropagatorConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) EnableClientCredentialsHeaderTokenPropagatorConfiguration
. Default value (true).- Parameters:
enabled
- enabled flag
-
setPrefix
Value prefix for Http Header. Default value ("Bearer").- Parameters:
prefix
- preffix before the header value
-
getPrefix
- Specified by:
getPrefix
in interfaceClientCredentialsHeaderTokenPropagatorConfiguration
- Returns:
- a Prefix before the token in the header value. E.g. Bearer
-
setHeaderName
Http Header to be used to propagate the token. Default value ("Authorization")- Parameters:
headerName
- HTTP header name
-
getHeaderName
- Specified by:
getHeaderName
in interfaceClientCredentialsHeaderTokenPropagatorConfiguration
- Returns:
- an HTTP Header name. e.g. Authorization
-