View Source TokenRefresher (Token Refresher v0.1.0)
TokenRefresher is responsible for continuously refreshing tokens
for multiple providers based on their expires_in
configuration.
Summary
Functions
Returns a specification to start this module under a supervisor.
Gets the current token for a given provider.
Starts the TokenRefresher supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Gets the current token for a given provider.
Parameters
- provider: The provider module.
Returns
{:ok, token}
if the token is found.{:error, :not_found}
if the provider is not found.
Starts the TokenRefresher supervisor.
Example
TokenRefresher.start_link()