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 Details

  • Constructor Details

    • SecurityViewModelProcessorConfigurationProperties

      public SecurityViewModelProcessorConfigurationProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • setEnabled

      public void setEnabled(boolean enabled)
      Enable SecurityViewModelProcessor. Default value (true).
      Parameters:
      enabled - enabled flag
    • setSecurityKey

      public void setSecurityKey(String securityKey)
      Model key name. Default value ("security").
      Parameters:
      securityKey - the key name which will be used in the model map.
    • getSecurityKey

      public String getSecurityKey()
      Specified by:
      getSecurityKey in interface SecurityViewModelProcessorConfiguration
      Returns:
      the key name which will be used in the model map.
    • getPrincipalNameKey

      @NonNull public @NonNull String getPrincipalNameKey()
      Specified by:
      getPrincipalNameKey in interface SecurityViewModelProcessorConfiguration
      Returns:
      the key for the principal name property which is used in the nested security map.
    • getAttributesKey

      @NonNull public @NonNull String getAttributesKey()
      Specified by:
      getAttributesKey in interface SecurityViewModelProcessorConfiguration
      Returns:
      the key for the attributes property which is used in the nested security map.
    • setPrincipalNameKey

      public void setPrincipalNameKey(@NonNull @NonNull String principalNameKey)
      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

      public void setAttributesKey(@NonNull @NonNull String attributesKey)
      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.