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

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

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 the token that can be used to authorize calls to Microsoft Bot Framework

Callback implementation for GenServer.init/1.

Link to this function

start_link(args \\ [])

Link to this function

time_to_refresh_after_in_seconds(arg)

The time to refresh which is taken from the response of the token