Class SecurityViewModelProcessorConfigurationProperties
java.lang.Object
io.micronaut.views.model.security.SecurityViewModelProcessorConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,SecurityViewModelProcessorConfiguration
@Requires(classes=io.micronaut.security.authentication.Authentication.class)
@ConfigurationProperties("micronaut.security.views-model-decorator")
public class SecurityViewModelProcessorConfigurationProperties
extends Object
implements SecurityViewModelProcessorConfiguration
ConfigurationProperties
implementation of SecurityViewModelProcessorConfiguration
.- Since:
- 1.1.0
- Author:
- Sergio del Amo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setAttributesKey
(String attributesKey) Nested security map key for the user's attributes property.void
setEnabled
(boolean enabled) EnableSecurityViewModelProcessor
.void
setPrincipalNameKey
(String principalNameKey) Nested security map key for the user's name property.void
setSecurityKey
(String securityKey) Model key name.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
DEFAULT_SECURITYKEY
The default securityKey value.- See Also:
-
DEFAULT_PRINCIPALNAME
The default principalNameKey value.- See Also:
-
DEFAULT_ATTRIBUTESKEY
The default attributesKey value.- See Also:
-
-
Constructor Details
-
SecurityViewModelProcessorConfigurationProperties
public SecurityViewModelProcessorConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) EnableSecurityViewModelProcessor
. Default value (true).- Parameters:
enabled
- enabled flag
-
setSecurityKey
Model key name. Default value ("security").- Parameters:
securityKey
- the key name which will be used in the model map.
-
getSecurityKey
- Specified by:
getSecurityKey
in interfaceSecurityViewModelProcessorConfiguration
- Returns:
- the key name which will be used in the model map.
-
getPrincipalNameKey
- Specified by:
getPrincipalNameKey
in interfaceSecurityViewModelProcessorConfiguration
- Returns:
- the key for the principal name property which is used in the nested security map.
-
getAttributesKey
- Specified by:
getAttributesKey
in interfaceSecurityViewModelProcessorConfiguration
- Returns:
- the key for the attributes property which is used in the nested security map.
-
setPrincipalNameKey
Nested security map key for the user's name property. Default value ("name").- Parameters:
principalNameKey
- the key which will be used in the nested security map.
-
setAttributesKey
Nested security map key for the user's attributes property. Default value ("attributes").- Parameters:
attributesKey
- the key which will be used in the nested security map.
-