oauth2_token_manager v0.1.0 OAuth2TokenManager.RefreshToken View Source
Link to this section Summary
Functions
Deletes a refresh token
Deletes all access tokens related to a subject or a client (in the client credentials flow)
Introspects a refresh token
Registers a refresh token
Revokes a refresh token
Link to this section Functions
Specs
delete( OAuth2TokenManager.refresh_token(), OAuth2TokenManager.issuer(), OAuth2TokenManager.client_config(), OAuth2TokenManager.opts() ) :: :ok | {:error, Exception.t()}
Deletes a refresh token
The refresh token is deleted in the local token data base. If the :revoke_on_delete
is set,
an attempt is made to revoke it on the server (but there is no way to know whether it was
successful or not).
Specs
delete_all( OAuth2TokenManager.issuer(), OAuth2TokenManager.subject() | :client_credentials, OAuth2TokenManager.client_config(), OAuth2TokenManager.opts() ) :: :ok | {:error, Exception.t() | [Exception.t()]}
Deletes all access tokens related to a subject or a client (in the client credentials flow)
Specs
introspect( OAuth2TokenManager.refresh_token(), OAuth2TokenManager.issuer(), OAuth2TokenManager.client_config(), OAuth2TokenManager.opts() ) :: {:ok, OAuth2TokenManager.token_metadata()} | {:error, Exception.t()}
Introspects a refresh token
A request is performed to the introspection endpoint of the authorization server if saved
metadata is not fresh (:min_introspect_interval
option, see OAuth2TokenManager.opts/0
).
The response is not saved. Use register/5
if you want to do so.
Specs
register( OAuth2TokenManager.refresh_token(), OAuth2TokenManager.token_metadata(), OAuth2TokenManager.issuer(), OAuth2TokenManager.client_config(), OAuth2TokenManager.opts() ) :: {:ok, OAuth2TokenManager.token_metadata()} | {:error, Exception.t()}
Registers a refresh token
Specs
revoke( OAuth2TokenManager.refresh_token(), OAuth2TokenManager.issuer(), OAuth2TokenManager.client_config(), OAuth2TokenManager.opts() ) :: :ok | {:error, Exception.t()}
Revokes a refresh token
It does not delete the refresh token locally. To do so, refer to delete/4