Method new()
Create a new CachedTokenCredential object
Usage
CachedTokenCredential$new(
scope = NULL,
tenant_id = NULL,
client_id = NULL,
chain = cached_token_credential_chain()
)
Arguments
scope
Optional character string specifying the authentication scope.
tenant_id
Optional character string specifying the tenant ID for
authentication.
client_id
Optional character string specifying the client ID for
authentication.
chain
A list of credential classes to attempt for cached tokens.
Defaults to AuthCodeCredential and DeviceCodeCredential.
Returns
A new CachedTokenCredential object
Method get_token()
Get an access token from the cache
Usage
CachedTokenCredential$get_token()
Returns
An httr2::oauth_token() object containing the access token
Method req_auth()
Add authentication to an httr2 request
Usage
CachedTokenCredential$req_auth(req)
Arguments
req
An httr2::request() object
Returns
The request object with authentication configured
Method clone()
The objects of this class are cloneable with this method.
Usage
CachedTokenCredential$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.