Class OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties

java.lang.Object
io.micronaut.security.token.propagation.AbstractOutgoingRequestProcessorMatcher
io.micronaut.security.oauth2.configuration.OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, io.micronaut.http.util.OutgoingRequestProcessorMatcher, ClientCredentialsConfiguration
Enclosing class:
OauthClientConfigurationProperties

@Requires(classes=io.micronaut.http.util.OutgoingRequestProcessorMatcher.class) @ConfigurationProperties("client-credentials") public static class OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties extends AbstractOutgoingRequestProcessorMatcher implements ClientCredentialsConfiguration
Client credentials configuration.
  • Field Details

    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enable value.
      See Also:
  • Constructor Details

    • ClientCredentialsConfigurationProperties

      public ClientCredentialsConfigurationProperties()
  • Method Details

    • getAdvancedExpiration

      @NonNull public @NonNull Duration getAdvancedExpiration()
      Specified by:
      getAdvancedExpiration in interface ClientCredentialsConfiguration
      Returns:
      The amount of time for a token obtained via client credentials grant to be considered expired prior to its expiration date.
    • getHeaderPropagation

      @NonNull public @NonNull Optional<ClientCredentialsHeaderTokenPropagatorConfiguration> getHeaderPropagation()
      Specified by:
      getHeaderPropagation in interface ClientCredentialsConfiguration
    • setHeaderPropagation

      Sets the Http Header Client Credentials Token Propagator configuration.
      Parameters:
      headerPropagation - client credentials header propagation.
    • setAdvancedExpiration

      public void setAdvancedExpiration(@NonNull @NonNull Duration advancedExpiration)
      Parameters:
      advancedExpiration - Number of seconds for a token obtained via client credentials grant to be considered expired prior to its expiration date. Default value (30 seconds).
    • getScope

      @NonNull public @NonNull Optional<String> getScope()
      Specified by:
      getScope in interface ClientCredentialsConfiguration
      Returns:
      Scope to be requested in the client credentials request.
    • setScope

      public void setScope(String scope)
      Scope to be requested in the client credentials request. Defaults to none.
      Parameters:
      scope - Scope to be requested in the client credentials request
    • isEnabled

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

      public void setEnabled(boolean enabled)
      Enables ClientCredentialsClient. Default value true
      Parameters:
      enabled - enabled flag
    • getAdditionalRequestParams

      @NonNull public @NonNull Map<String,String> getAdditionalRequestParams()
      Specified by:
      getAdditionalRequestParams in interface ClientCredentialsConfiguration
      Returns:
      a Map of additional request parameters
    • setAdditionalRequestParams

      public void setAdditionalRequestParams(@MapFormat(transformation=FLAT) Map<String,String> additionalRequestParams)
      Additional parameters included in the client-credentials flow.
      Parameters:
      additionalRequestParams - Map of additional request parameters to include in client-credentials flow