Interface ClientCredentialsTokenPropagator

All Superinterfaces:
io.micronaut.core.order.Ordered
All Known Implementing Classes:
ClientCredentialsHeaderTokenPropagator, DefaultClientCredentialsTokenPropagator

@DefaultImplementation(DefaultClientCredentialsTokenPropagator.class) public interface ClientCredentialsTokenPropagator extends io.micronaut.core.order.Ordered
Responsible for retrieving and writing tokens obtained via a client credentials request.
Since:
2.2.0
Author:
Sergio del Amo
  • Field Summary

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    findToken(@NonNull io.micronaut.http.HttpRequest<?> request)
    Attempts to retrieve a token in a request.
    void
    writeToken(@NonNull io.micronaut.http.MutableHttpRequest<?> request, @NonNull String token)
    Writes the token to the request.

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Method Details

    • writeToken

      void writeToken(@NonNull @NonNull io.micronaut.http.MutableHttpRequest<?> request, @NonNull @NonNull String token)
      Writes the token to the request.
      Parameters:
      request - The MutableHttpRequest instance
      token - A token ( e.g. JWT token, basic auth token...)
    • findToken

      Optional<String> findToken(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request)
      Attempts to retrieve a token in a request.
      Parameters:
      request - The request to look for the token in
      Returns:
      An optional token string