Package google.registry.bsa.api
Class BsaCredential
java.lang.Object
google.registry.bsa.api.BsaCredential
A credential for accessing the BSA API.
Fetches on-demand an auth token from BSA's auth http endpoint and caches it for repeated use until the token expires (expiry set by BSA and recorded in the configuration file). An expired token is refreshed only when requested. Token refreshing is blocking but thread-safe.
The token-fetching request authenticates itself with an API key, which is stored in the Secret Manager.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the auth token for accessing the BSA API.
-
Field Details
-
ID_TOKEN
The variable name for the auth token in the returned json response.- See Also:
-
-
Method Details
-
getAuthToken
Returns the auth token for accessing the BSA API.This method refreshes the token if it is expired, and is thread-safe..
-