Stores the access token and associated details (such as username and expiration time) in the internal state.
The token is typically retrieved from the server during login and used for subsequent API requests.
Usage
set_token(token, user = "", expires_in = 3600)
Arguments
- token
The access token string issued by the authorization server.
- user
The username associated with the token (optional).
- expires_in
The lifetime of the access token in seconds (optional, default is 3600 seconds).
Value
No return value. Updates the internal state with the token info.