View Source TwitchAPI.AuthCallbacks behaviour (hello_twitch_api v0.5.1)
Behaviour defined for TwitchAPI.AuthStore
callback options.
Summary
Callbacks
This function is called after the TwitchAPI.AuthStore.init/2
function is
called, and before the token is validated (and attempted to refresh if not
valid).
This function is called whenever a TwitchAPI.Auth.t/0
is added to the
store and every time a token is refreshed.
This function is called whenever the TwitchAPI.AuthStore.terminate/2
function is called. It is useful for any clean-up needed.
Types
Callbacks
@callback load(name(), TwitchAPI.Auth.t()) :: TwitchAPI.Auth.t()
This function is called after the TwitchAPI.AuthStore.init/2
function is
called, and before the token is validated (and attempted to refresh if not
valid).
@callback put(name(), TwitchAPI.Auth.t()) :: TwitchAPI.Auth.t()
This function is called whenever a TwitchAPI.Auth.t/0
is added to the
store and every time a token is refreshed.
@callback terminate(name(), TwitchAPI.Auth.t()) :: TwitchAPI.Auth.t()
This function is called whenever the TwitchAPI.AuthStore.terminate/2
function is called. It is useful for any clean-up needed.