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 java.lang.Object implements BearerTokenConfigurationDefault implementation ofBearerTokenConfiguration.- Since:
 - 1.0
 - Author:
 - Sergio del Amo
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ENABLEDstatic java.lang.StringPREFIX 
- 
Constructor Summary
Constructors Constructor Description BearerTokenConfigurationProperties() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetHeaderName()java.lang.StringgetPrefix()booleanisEnabled()voidsetEnabled(boolean enabled)Set whether to enable bearer token authentication.voidsetHeaderName(java.lang.String headerName)Sets the header name to use.voidsetPrefix(java.lang.String prefix)Sets the prefix to use for the auth token. 
 - 
 
- 
- 
Field Detail
- 
PREFIX
public static final java.lang.String PREFIX
- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
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
public java.lang.String getPrefix()
- Specified by:
 getPrefixin interfaceBearerTokenConfiguration- Returns:
 - a Prefix before the token in the header value. E.g. Bearer
 
 
- 
getHeaderName
public java.lang.String 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
public void setHeaderName(java.lang.String headerName)
Sets the header name to use. Default value "Authorization".- Parameters:
 headerName- The header name to use
 
- 
setPrefix
public void setPrefix(java.lang.String prefix)
Sets the prefix to use for the auth token. Default value "Bearer".- Parameters:
 prefix- The prefix to use
 
 - 
 
 -