Azure OAuth 2.0 token class, inheriting from the Token2.0 class in httr. Rather than calling the initialization method directly, tokens should be created via get_azure_token()
.
AzureToken
An R6 object of class AzureToken
.
refresh
: Refreshes the token. For expired Azure tokens using client credentials, refreshing really means requesting a new token.
validate
: Checks if the token is still valid. For Azure tokens using client credentials, this just checks if the current time is less than the token's expiry time.
This class never caches its tokens, unlike httr::Token2.0.