@ConfigurationProperties(value="micronaut.security.token") public class TokenConfigurationProperties extends java.lang.Object implements TokenConfiguration
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static java.lang.String |
PREFIX |
DEFAULT_NAME_KEY, DEFAULT_ROLES_NAME
Constructor and Description |
---|
TokenConfigurationProperties() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getNameKey()
Key which will be used in the
Authentication.getAttributes() for the User`s name. |
java.lang.String |
getRolesName()
Key which will be used in the
Authentication.getAttributes() for the User`s roles. |
boolean |
isEnabled() |
void |
setEnabled(boolean enabled)
Sets whether the configuration is enabled.
|
void |
setNameKey(java.lang.String nameKey)
Authentication attributes map key for the user's name. |
void |
setRolesName(java.lang.String rolesName)
Authentication attributes map key for the user's roles. |
public static final java.lang.String PREFIX
public static final boolean DEFAULT_ENABLED
public boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
@NonNull public java.lang.String getRolesName()
TokenConfiguration
Authentication.getAttributes()
for the User`s roles.getRolesName
in interface TokenConfiguration
().
If not specified, defaults to {@link #DEFAULT_ROLES_NAME}.
public void setEnabled(boolean enabled)
enabled
- True if it is enabledpublic void setRolesName(@NonNull java.lang.String rolesName)
Authentication
attributes map key for the user's roles. Default value "roles".rolesName
- The roles name@NonNull public java.lang.String getNameKey()
TokenConfiguration
Authentication.getAttributes()
for the User`s name.getNameKey
in interface TokenConfiguration
If not specified, defaults to {@link #DEFAULT_NAME_KEY}.
public void setNameKey(@NonNull java.lang.String nameKey)
Authentication
attributes map key for the user's name. Default value "sub".nameKey
- key for name