TwitchApi.OIDC (TwitchApi v0.1.2) View Source
This module provides a process to hold the state for twitch user access tokens
Link to this section Summary
Functions
Add state the Genserver state list
Returns a specification to start this module under a supervisor.
Delete state the Genserver state list
Callback function when the GenServer fetches the status. Filter sensitive data.
Returns the access token for the given user by user_id
Returns the access token for the given user by user_id
Returns the Genserver state
Callback for the GenServer to handle the state message for retieving previously created state.
:browser => Callback for the GenServer to handle the browser message :access_token => Callback for the GenServer to handle the user access token
Callback for the GenServer to handle the refresh message
Callback function when the GenServer is started
Request the access token for the previously authorized user
Function to send the message to refresh
Starts the GenServer
Link to this section Types
Specs
state() :: %TwitchApi.OIDC{ state: [binary()], users_id: users_data(), users_name: users_data() }
Specs
Specs
Link to this section Functions
Specs
add_to_state(binary()) :: :ok
Add state the Genserver state list
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
delete_from_state(binary()) :: :ok
Delete state the Genserver state list
Specs
Callback function when the GenServer fetches the status. Filter sensitive data.
Specs
Returns the access token for the given user by user_id
Specs
Returns the access token for the given user by user_id
Specs
get_state() :: binary()
Returns the Genserver state
Callback for the GenServer to handle the state message for retieving previously created state.
:browser => Callback for the GenServer to handle the browser message :access_token => Callback for the GenServer to handle the user access token
Callback for the GenServer to handle the refresh message
Specs
Callback function when the GenServer is started
Specs
request_access_token(map()) :: :ok
Request the access token for the previously authorized user
Specs
schedule_refresh(binary(), binary(), binary(), non_neg_integer()) :: reference()
Function to send the message to refresh
Specs
Starts the GenServer