Interface ClientCredentialsClient

All Known Implementing Classes:
AbstractClientCredentialsClient, DefaultClientCredentialsClient, DefaultClientCredentialsOpenIdClient

public interface ClientCredentialsClient
Since:
2.2.0
Author:
Sergio del Amo
  • Method Details

    • requestToken

      @NonNull org.reactivestreams.Publisher<TokenResponse> requestToken(@Nullable String scope)
      Parameters:
      scope - Requested scope values for the access token.
      Returns:
      Response of an authorization server to a valid client credentials request.
    • requestToken

      @NonNull org.reactivestreams.Publisher<TokenResponse> requestToken(@Nullable String scope, boolean force)
      Parameters:
      scope - Requested scope values for the access token.
      force - true to invalidate the cached token response and fetch a new one
      Returns:
      Response of an authorization server to a valid client credentials request.
    • requestToken

      default @NonNull org.reactivestreams.Publisher<TokenResponse> requestToken()
      Returns:
      Response of an authorization server to a valid client credentials request.
    • requestToken

      default @NonNull org.reactivestreams.Publisher<TokenResponse> requestToken(boolean force)
      Parameters:
      force - true to invalidate the cached token response and fetch a new one
      Returns:
      Response of an authorization server to a valid client credentials request.
    • of

      static @NonNull ClientCredentialsClient of(@NonNull io.micronaut.http.client.HttpClient client, @NonNull OauthClientConfiguration oauthClientConfiguration)
      Instantiate a Client Credentials Client to be used in a scenario where you don't have/want or need a Micronaut Bean Context.
      Parameters:
      client - HTTP Client. The caller owns the provided client lifecycle and is responsible for closing it.
      oauthClientConfiguration - OAuth Client Configuration
      Returns:
      A Client Credentials Client
      Since:
      5.1.0