Inherited methods
Method new()
Create a new refresh token credential
Usage
RefreshTokenCredential$new(
refresh_token = default_refresh_token(),
scope = NULL,
tenant_id = NULL,
client_id = NULL
)
Arguments
refresh_token
A character string containing the refresh token.
Defaults to default_refresh_token() which reads from the
AZURE_REFRESH_TOKEN environment variable.
scope
A character string specifying the OAuth2 scope. Defaults to NULL.
tenant_id
A character string specifying the Azure Active Directory
tenant ID. Defaults to NULL.
client_id
A character string specifying the application (client) ID.
Defaults to NULL.
Returns
A new RefreshTokenCredential object
Method validate()
Validate the credential configuration
Usage
RefreshTokenCredential$validate()
Details
Checks that the refresh token is provided and not NA or NULL. Calls the
parent class validation method.
Method get_token()
Get an access token using the refresh token flow
Usage
RefreshTokenCredential$get_token()
Returns
An httr2::oauth_token() object containing the access token
Method req_auth()
Add OAuth refresh token authentication to an httr2 request
Usage
RefreshTokenCredential$req_auth(req)
Arguments
req
An httr2::request() object
Returns
The request object with OAuth refresh token authentication configured
Method clone()
The objects of this class are cloneable with this method.
Usage
RefreshTokenCredential$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.