Package net.finmath.pontes.erc7573
Interface PontesAccessTokenProvider
- All Known Implementing Classes:
OAuth2PasswordPontesAccessTokenProvider
public interface PontesAccessTokenProvider
Prepares and then locally supplies a Pontes bearer token to resource requests.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidassertPrepared(Duration minimumValidity) Performs a local-only check that the prepared token still covers the required request window.Returns an already prepared token and must never perform network I/O.static PontesAccessTokenProvidervoidMay acquire or refresh a token.static StringrequireValidBearerToken(String accessToken) Validates the RFC 6750b64tokencharacter set without ever echoing the token.
-
Field Details
-
MAX_ACCESS_TOKEN_LENGTH
static final int MAX_ACCESS_TOKEN_LENGTH- See Also:
-
-
Method Details
-
prepare
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
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
-
requireValidBearerToken
Validates the RFC 6750b64tokencharacter 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.
-