Class OauthConfigurationProperties

java.lang.Object
io.micronaut.security.oauth2.configuration.OauthConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, OauthConfiguration

@ConfigurationProperties("micronaut.security.oauth2") public class OauthConfigurationProperties extends Object implements OauthConfiguration
ConfigurationProperties implementation of OauthClientConfiguration.
Since:
1.2.0
Author:
Sergio del Amo
  • Field Details

  • Constructor Details

    • OauthConfigurationProperties

      public OauthConfigurationProperties()
  • Method Details

    • isEnabled

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

      public void setEnabled(boolean enabled)
      Sets whether the OAuth 2.0 support is enabled. Default value (true).
      Parameters:
      enabled - True if is enabled
    • getLoginUri

      @NonNull public @NonNull String getLoginUri()
      Specified by:
      getLoginUri in interface OauthConfiguration
      Returns:
      the login Uri
    • setLoginUri

      public void setLoginUri(@NonNull @NonNull String loginUri)
      The URI template that is used to initiate an OAuth 2.0 authorization code grant flow. Default value ("/oauth/login{/provider}").
      Parameters:
      loginUri - The Login uri
    • getCallbackUri

      @NonNull public @NonNull String getCallbackUri()
      Specified by:
      getCallbackUri in interface OauthConfiguration
      Returns:
      the Callback Uri
    • setDefaultProvider

      public void setDefaultProvider(String defaultProvider)
      The default authentication provider for an OAuth 2.0 authorization code grant flow.
      Parameters:
      defaultProvider - The default authentication provider
    • getDefaultProvider

      @Nullable public @Nullable Optional<String> getDefaultProvider()
      Specified by:
      getDefaultProvider in interface OauthConfiguration
      Returns:
      the default authorization provider
    • setCallbackUri

      public void setCallbackUri(@NonNull @NonNull String callbackUri)
      The URI template that OAuth 2.0 providers can use to submit an authorization callback request. Default value ("/oauth/callback{/provider}").
      Parameters:
      callbackUri - The callback Uri
    • getOpenid

      @NonNull public @NonNull OpenIdConfiguration getOpenid()
      Specified by:
      getOpenid in interface OauthConfiguration
      Returns:
      OpenID Connect Configuration
    • setOpenid

      public void setOpenid(@NonNull @NonNull OauthConfigurationProperties.OpenIdConfigurationProperties openid)
      The OpenID configuration.
      Parameters:
      openid - The OpenID configuration