Class OauthControllerConfigurationProperties

java.lang.Object
io.micronaut.security.endpoints.OauthControllerConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, ControllerConfiguration, OauthControllerConfiguration

@Requires(property="micronaut.security.endpoints.oauth.enabled", notEquals="false", defaultValue="true") @ConfigurationProperties("micronaut.security.endpoints.oauth") public class OauthControllerConfigurationProperties extends Object implements OauthControllerConfiguration
Configures the provided OauthController.
Since:
1.0
Author:
Sergio del Amo
  • Field Details

    • PREFIX

      public static final String PREFIX
      See Also:
    • DEFAULT_ENABLED

      @Deprecated(forRemoval=true, since="4.11.0") public static final boolean DEFAULT_ENABLED
      Deprecated, for removal: This API element is subject to removal in a future version.
      Not used. ControllerConfigurationProperties.DEFAULT_ENABLED is used instead.
      The default enable value.
      See Also:
    • DEFAULT_PATH

      public static final String DEFAULT_PATH
      The default path.
      See Also:
    • DEFAULT_GETALLOWED

      public static final boolean DEFAULT_GETALLOWED
      Default Get Allowed.
      See Also:
  • Constructor Details

    • OauthControllerConfigurationProperties

      public OauthControllerConfigurationProperties()
  • Method Details

    • setEnabled

      public void setEnabled(boolean enabled)
      Sets whether the OauthController is enabled. Default value (true).
      Parameters:
      enabled - True if is enabled
    • setPath

      public void setPath(String path)
      Sets the path to map the OauthController to. Default value ("/oauth/access_token").
      Parameters:
      path - The path
    • isGetAllowed

      public boolean isGetAllowed()
      Specified by:
      isGetAllowed in interface OauthControllerConfiguration
      Returns:
      True if refresh requests can be GET
    • setGetAllowed

      public void setGetAllowed(boolean getAllowed)
      Enables HTTP GET invocations of refresh token requests. Only applies to requests sending a cookie (JWT_REFRESH_TOKEN). Default value (true).
      Parameters:
      getAllowed - Whether Http GET should be supported.
    • getPostContentTypes

      public Set<String> getPostContentTypes()
      Specified by:
      getPostContentTypes in interface ControllerConfiguration
      Returns:
      Supported HTTP methods for POST endpoints.
    • setPostContentTypes

      public void setPostContentTypes(Set<String> postContentTypes)
      Supported content types for POST endpoints. Default Value application/json and application/x-www-form-urlencoded
      Parameters:
      postContentTypes - supported content types for POST endpoints.
    • isEnabled

      public boolean isEnabled()
      Whether the controller is enabled.
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
      Returns:
      Whether the controller is enabled.
    • getPath

      @NonNull public @NonNull String getPath()
      Specified by:
      getPath in interface ControllerConfiguration
      Returns:
      the path where the controller is enabled.