| InteractiveCredential | R Documentation |
Base class for interactive authentication credentials. This class should not be instantiated directly; use DeviceCodeCredential or AuthCodeCredential instead.
Credential -> InteractiveCredential
use_refresh_tokenLogical indicating whether to use the login flow (acquire tokens via refresh token exchange).
allow_promptLogical indicating whether this credential may prompt the user (vs. only reading cached/refresh tokens).
Credential$print()Credential$validate()InteractiveCredential$new()Shared initializer for interactive credentials
InteractiveCredential$new( scope = NULL, tenant_id = NULL, client_id = default_azure_cli_client_id(), use_cache = "disk", offline = TRUE, allow_prompt = TRUE, use_refresh_token = TRUE, flow_fun, req_auth_fun, oauth_endpoint, name, extra_flow_params = list(), interactive = NULL )
scopeA character string specifying the OAuth2 scope.
tenant_idAzure AD tenant ID.
client_idApplication (client) ID. Defaults to the Azure CLI public client ID.
use_cacheCache type: "disk" or "memory".
offlineWhether to request offline access (refresh tokens).
allow_promptWhether this credential may prompt the user (vs. only reading cached/refresh tokens).
use_refresh_tokenWhether to use the login flow (acquire tokens via refresh token
exchange). Set to FALSE to use the access token flow directly.
flow_funThe httr2 OAuth flow function (e.g. httr2::oauth_flow_device).
req_auth_funThe httr2 request auth function (e.g. httr2::req_oauth_device).
oauth_endpointThe OAuth endpoint name passed to the parent credential.
nameThe credential name passed to the parent credential.
extra_flow_paramsA named list of additional parameters merged into
private$.flow_params after scope and auth_url.
interactiveDeprecated. Use allow_prompt instead.
InteractiveCredential$is_interactive()Check if the credential requires user interaction
InteractiveCredential$is_interactive()
Logical indicating whether this credential is interactive
InteractiveCredential$get_token()Get an access token using the flow configured by the subclass.
Returns a valid in-object cached token immediately if one exists for the
requested scope. Otherwise attempts token acquisition in three steps:
(1) return a valid httr2-cached token without any interaction; (2)
silently refresh using an existing refresh token; (3) fall back to the
configured interactive flow. When reauth = TRUE all caches are bypassed
and the interactive flow is used directly.
InteractiveCredential$get_token(scope = NULL, reauth = FALSE)
scopeA character string specifying the OAuth2 scope. Defaults to
NULL, which uses the scope configured on the credential.
reauthA logical value indicating whether to force
reauthentication, bypassing the cache and silent refresh. Defaults to
FALSE.
An httr2::oauth_token() object containing the access token
InteractiveCredential$req_auth()Add OAuth authentication to an httr2 request using the flow configured by the subclass
InteractiveCredential$req_auth(req)
reqAn httr2::request() object
The request object with OAuth authentication configured
InteractiveCredential$clone()The objects of this class are cloneable with this method.
InteractiveCredential$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.