Class HttpHeaderTokenPropagatorConfigurationProperties

java.lang.Object
io.micronaut.security.token.propagation.HttpHeaderTokenPropagatorConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, HttpHeaderTokenPropagatorConfiguration

@Requires(property="micronaut.security.token.propagation.header.enabled", notEquals="false") @ConfigurationProperties("micronaut.security.token.propagation.header") public class HttpHeaderTokenPropagatorConfigurationProperties extends Object implements HttpHeaderTokenPropagatorConfiguration
Http header token propagation configuration.
Since:
1.4.0
Author:
James Kleeh
  • Field Details

  • Constructor Details

    • HttpHeaderTokenPropagatorConfigurationProperties

      public HttpHeaderTokenPropagatorConfigurationProperties()
  • Method Details

    • isEnabled

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

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

      public void setPrefix(String headerPrefix)
      Value prefix for Http Header. Default value ("Bearer").
      Parameters:
      headerPrefix - preffix before the header value
    • getPrefix

      public String getPrefix()
      Specified by:
      getPrefix in interface HttpHeaderTokenPropagatorConfiguration
      Returns:
      a Prefix before the token in the header value. E.g. Bearer
    • setHeaderName

      public void setHeaderName(String headerName)
      Http Header to be used to propagate the token. Default value ("Authorization")
      Parameters:
      headerName - HTTP header name
    • getHeaderName

      public String getHeaderName()
      Specified by:
      getHeaderName in interface HttpHeaderTokenPropagatorConfiguration
      Returns:
      an HTTP Header name. e.g. Authorization