Interface PontesAccessTokenProvider

All Known Implementing Classes:
OAuth2PasswordPontesAccessTokenProvider

public interface PontesAccessTokenProvider
Prepares and then locally supplies a Pontes bearer token to resource requests.
  • Field Details

  • Method Details

    • prepare

      void prepare(Duration minimumValidity)
      May acquire or refresh a token. Mutation coordinators call this before their durable dispatch boundary so authentication I/O cannot make an unsent request look ambiguous.
    • assertPrepared

      default void assertPrepared(Duration minimumValidity)
      Performs a local-only check that the prepared token still covers the required request window. Implementations must not contact the token endpoint from this method.
    • currentAccessToken

      String currentAccessToken()
      Returns an already prepared token and must never perform network I/O.
    • fixed

      static PontesAccessTokenProvider fixed(String accessToken)
    • requireValidBearerToken

      static String requireValidBearerToken(String accessToken)
      Validates the RFC 6750 b64token character set without ever echoing the token. Header validation in the JDK happens too late for mutation requests and its exception may include the complete header value, so callers must use this before a durable boundary.