Class HttpHeaderTokenPropagatorConfigurationProperties
java.lang.Object
io.micronaut.security.token.propagation.HttpHeaderTokenPropagatorConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,HttpHeaderTokenPropagatorConfiguration
@Requires(property="micronaut.security.token.propagation.header.enabled",
notEquals="false")
@ConfigurationProperties("micronaut.security.token.propagation.header")
public class HttpHeaderTokenPropagatorConfigurationProperties
extends Object
implements HttpHeaderTokenPropagatorConfiguration
Http header token propagation configuration.
- Since:
- 1.4.0
- Author:
- James Kleeh
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default enable value.static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setEnabled
(boolean enabled) EnableHttpHeaderTokenPropagator
.void
setHeaderName
(String headerName) Http Header to be used to propagate the token.void
Value prefix for Http Header.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
-
Constructor Details
-
HttpHeaderTokenPropagatorConfigurationProperties
public HttpHeaderTokenPropagatorConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) EnableHttpHeaderTokenPropagator
. Default value (true).- Parameters:
enabled
- enabled flag
-
setPrefix
Value prefix for Http Header. Default value ("Bearer").- Parameters:
headerPrefix
- preffix before the header value
-
getPrefix
- Specified by:
getPrefix
in interfaceHttpHeaderTokenPropagatorConfiguration
- 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 interfaceHttpHeaderTokenPropagatorConfiguration
- Returns:
- an HTTP Header name. e.g. Authorization
-