Discovers and returns an authenticated credential object from a chain of credential providers. This function attempts each credential in the chain until one successfully authenticates, returning the first successful credential object.
Usage
get_credential_provider(
scope = NULL,
tenant_id = NULL,
client_id = NULL,
client_secret = NULL,
use_cache = "disk",
offline = TRUE,
oauth_host = NULL,
oauth_endpoint = NULL,
chain = NULL
)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.
- client_secret
Optional character string specifying the client secret for authentication.
- use_cache
Character string indicating the caching strategy. Defaults to
"disk". Options include"disk"for disk-based caching or"memory"for in-memory caching.- offline
Logical. If
TRUE, adds 'offline_access' to the scope to request a 'refresh_token'. Defaults toTRUE.- oauth_host
Optional character string specifying the OAuth host URL.
- oauth_endpoint
Optional character string specifying the OAuth endpoint.
- chain
A list of credential objects, where each element must inherit from the
Credentialbase class. Credentials are attempted in the order provided untilget_tokensucceeds. IfNULL, usesdefault_credential_chain().