Class BearerTokenConfigurationProperties
java.lang.Object
io.micronaut.security.token.jwt.bearer.BearerTokenConfigurationProperties
- All Implemented Interfaces:
 io.micronaut.core.util.Toggleable,BearerTokenConfiguration
@Requires(property="micronaut.security.token.jwt.bearer.enabled",
          notEquals="false")
@ConfigurationProperties("micronaut.security.token.jwt.bearer")
public class BearerTokenConfigurationProperties
extends Object
implements BearerTokenConfiguration
Default implementation of 
BearerTokenConfiguration.- Since:
 - 1.0
 - Author:
 - Sergio del Amo
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetEnabled(boolean enabled) Set whether to enable bearer token authentication.voidsetHeaderName(String headerName) Sets the header name to use.voidSets the prefix to use for the auth token. 
- 
Field Details
- 
PREFIX
- See Also:
 
 - 
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED- See Also:
 
 
 - 
 - 
Constructor Details
- 
BearerTokenConfigurationProperties
public BearerTokenConfigurationProperties() 
 - 
 - 
Method Details
- 
isEnabled
public boolean isEnabled()- Specified by:
 isEnabledin interfaceBearerTokenConfiguration- Specified by:
 isEnabledin interfaceio.micronaut.core.util.Toggleable- Returns:
 - a boolean flag indicating whether BearerTokenReader bean should be enabled or not
 
 - 
getPrefix
- Specified by:
 getPrefixin interfaceBearerTokenConfiguration- Returns:
 - a Prefix before the token in the header value. E.g. Bearer
 
 - 
getHeaderName
- Specified by:
 getHeaderNamein interfaceBearerTokenConfiguration- Returns:
 - an HTTP Header name. e.g. Authorization
 
 - 
setEnabled
public void setEnabled(boolean enabled) Set whether to enable bearer token authentication. Default value true.- Parameters:
 enabled- True if enabled
 - 
setHeaderName
Sets the header name to use. Default value Authorization.- Parameters:
 headerName- The header name to use
 - 
setPrefix
Sets the prefix to use for the auth token. Default value Bearer.- Parameters:
 headerPrefix- The prefix to use
 
 -