Class TokenConfigurationProperties
- java.lang.Object
-
- io.micronaut.security.token.config.TokenConfigurationProperties
-
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable,TokenConfiguration
@ConfigurationProperties("micronaut.security.token") public class TokenConfigurationProperties extends java.lang.Object implements TokenConfigurationDefines Security Token Configuration.- Since:
- 1.0
- Author:
- Sergio del Amo
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ENABLEDThe default enable value.static java.lang.StringDEFAULT_ROLES_NAMEDeprecated.UseTokenConfiguration.DEFAULT_ROLES_NAMEinsteadstatic java.lang.StringPREFIX
-
Constructor Summary
Constructors Constructor Description TokenConfigurationProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetRolesName()The name in the claims object that stores the granted roles.booleanisEnabled()voidsetEnabled(boolean enabled)Sets whether the configuration is enabled.voidsetRolesName(java.lang.String rolesName)Name of the roles property.
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
The default enable value.- See Also:
- Constant Field Values
-
DEFAULT_ROLES_NAME
@Deprecated public static final java.lang.String DEFAULT_ROLES_NAME
Deprecated.UseTokenConfiguration.DEFAULT_ROLES_NAMEinsteadThe default roles name.- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
getRolesName
public java.lang.String getRolesName()
Description copied from interface:TokenConfigurationThe name in the claims object that stores the granted roles.- Specified by:
getRolesNamein interfaceTokenConfiguration- Returns:
- The roles claim name, e.g. roles.
- See Also:
(). If not specified, defaults to .
-
setEnabled
public void setEnabled(boolean enabled)
Sets whether the configuration is enabled. Default value true.- Parameters:
enabled- True if it is enabled
-
setRolesName
public void setRolesName(java.lang.String rolesName)
Name of the roles property. Default value "roles".- Parameters:
rolesName- The roles name
-
-