Inherited methods
Method new()
Create a new Azure CLI credential
Usage
AzureCLICredential$new(
scope = NULL,
tenant_id = NULL,
process_timeout = NULL,
login = FALSE,
use_bridge = FALSE
)
Arguments
scope
A character string specifying the OAuth2 scope. Defaults to
NULL, which uses the scope set during initialization.
tenant_id
A character string specifying the Azure Active Directory
tenant ID. Defaults to NULL, which uses the default tenant from Azure CLI.
process_timeout
A numeric value specifying the timeout in seconds
for the Azure CLI process. Defaults to 10.
login
A logical value indicating whether to check if the user is
logged in and perform login if needed. Defaults to FALSE.
use_bridge
A logical value indicating whether to use the device code
bridge webpage during login. If TRUE, launches an intermediate local webpage
that displays the device code and facilitates copy-pasting before redirecting
to the Microsoft device login page. Only used when login = TRUE. Defaults to FALSE.
Returns
A new AzureCLICredential object
Method get_token()
Get an access token from Azure CLI
Usage
AzureCLICredential$get_token(scope = NULL)
Arguments
scope
A character string specifying the OAuth2 scope. If NULL,
uses the scope specified during initialization.
Returns
An httr2::oauth_token() object containing the access token
Method req_auth()
Add authentication to an httr2 request
Usage
AzureCLICredential$req_auth(req, scope = NULL)
Arguments
req
An httr2::request() object
scope
A character string specifying the OAuth2 scope. If NULL,
uses the scope specified during initialization.
Returns
The request object with authentication header added
Method account_show()
Show the currently active Azure CLI account information
Usage
AzureCLICredential$account_show(timeout = NULL)
Arguments
timeout
A numeric value specifying the timeout in seconds for the
Azure CLI command. If NULL, uses the process timeout specified during
initialization.
Returns
A list containing the account information from Azure CLI
Method login()
Perform Azure CLI login using device code flow
Usage
AzureCLICredential$login()
Returns
Invisibly returns the exit status (0 for success, non-zero for failure)
Method logout()
Log out from Azure CLI
Usage
AzureCLICredential$logout()
Returns
Invisibly returns NULL
Method clone()
The objects of this class are cloneable with this method.
Usage
AzureCLICredential$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.