ExMicrosoftBot.TokenManager (ex_microsoftbot v3.0.0)
This module is a GenServer that handles getting access token from Microsoft bot framework and also is responsible for refreshing the token before it expires.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Refresh the token by making a service call and then scheduling a message to this GenServer before token expires so that it can be refreshed
Get the token that can be used to authorize calls to Microsoft Bot Framework
Callback implementation for GenServer.init/1
.
The time to refresh which is taken from the response of the token
Link to this section Functions
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
get_refreshed_state(auth_data, old_state)
Refresh the token by making a service call and then scheduling a message to this GenServer before token expires so that it can be refreshed
get_token()
Get the token that can be used to authorize calls to Microsoft Bot Framework
init(args)
Callback implementation for GenServer.init/1
.
start_link(args \\ [])
time_to_refresh_after_in_seconds(arg)
The time to refresh which is taken from the response of the token