AzureAuth (version 1.1.0)

AzureToken: Azure OAuth authentication

Description

Azure OAuth 2.0 token classes, with an interface based on the Token2.0 class in httr. Rather than calling the initialization methods directly, tokens should be created via get_azure_token().

Usage

AzureToken

AzureTokenV1

AzureTokenV2

Arguments

Format

An R6 object representing an Azure Active Directory token and its associated credentials. The AzureTokenV1 class is for AAD v1.0 tokens, and the AzureTokenV2 class is for AAD v2.0 tokens. Objects of the AzureToken class should not be created directly.

Methods

  • refresh: Refreshes the token. For expired tokens without an associated refresh token, refreshing really means requesting a new token.

  • validate: Checks if the token is still valid. If there is no associated refresh token, this just checks if the current time is less than the token's expiry time.

  • hash: Computes an MD5 hash on the input fields of the object. Used internally for identification purposes when caching.

  • cache: Stores the token on disk for use in future sessions.

See Also

get_azure_token, httr::Token