Inherited methods
Method new()
Create a new authorization code credential
Usage
AuthCodeCredential$new(
scope = NULL,
tenant_id = NULL,
client_id = NULL,
use_cache = "disk",
offline = TRUE,
redirect_uri = default_redirect_uri()
)
Arguments
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.
use_cache
A character string specifying the cache type. Use "disk"
for disk-based caching or "memory" for in-memory caching. Defaults to "disk".
offline
A logical value indicating whether to request offline access
(refresh tokens). Defaults to TRUE.
redirect_uri
A character string specifying the redirect URI registered
with the application. Defaults to default_redirect_uri().
Returns
A new AuthCodeCredential object
Method get_token()
Get an access token using authorization code flow
Usage
AuthCodeCredential$get_token(reauth = FALSE)
Arguments
reauth
A logical value indicating whether to force reauthentication.
Defaults to FALSE.
Returns
An httr2::oauth_token() object containing the access token
Method req_auth()
Add OAuth authorization code authentication to an httr2 request
Usage
AuthCodeCredential$req_auth(req)
Arguments
req
An httr2::request() object
Returns
The request object with OAuth authorization code authentication configured
Method clone()
The objects of this class are cloneable with this method.
Usage
AuthCodeCredential$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.