OAuth2 client-credentials token manager.
Fetches a Bearer token from the Solaris OAuth2 endpoint, caches it in
:persistent_term for zero-serialization reads, and proactively refreshes
it 60 seconds before expiry via an internal timer.
Started automatically by Solaris.Application. All Solaris API calls go
through get_token/0 which returns the cached token if still valid.
Caching strategy
Tokens are stored under a single :persistent_term key. Reads are
O(1) with no GenServer round-trip in the hot path. Only cache misses and
forced refreshes serialise through the GenServer.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns a valid Bearer access token.
Force-refreshes the access token regardless of cache state.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Returns a valid Bearer access token.
Reads from the :persistent_term cache when possible (no GenServer call).
Falls back to a synchronous token fetch on cache miss or near-expiry.
Force-refreshes the access token regardless of cache state.