Request an OpenID Connect identity token suitable for workload identity federation with a third-party service.
Usage
connect_workload_token(
...,
content_token = Sys.getenv("CONNECT_CONTENT_SESSION_TOKEN"),
server_url = Sys.getenv("CONNECT_SERVER"),
api_key = Sys.getenv("CONNECT_API_KEY")
)
has_workload_token(...)Arguments
- ...
Further arguments passed on to
connect_workload_token().- content_token
A token that uniquely identifies this content session. Defaults to the value of the
CONNECT_CONTENT_SESSION_TOKENenvironment variable, which is set automatically when running on Connect.- server_url
The Connect server to exchange credentials with. Defaults to the value of the
CONNECT_SERVERenvironment variable, which is set automatically when running on Connect.- api_key
An API key for the Connect server. Defaults to the value of the
CONNECT_API_KEYenvironment variable, which is set automatically when running on Connect.
Value
connect_workload_token() returns an httr2::oauth_token.
has_workload_token() returns TRUE if a workload identity token
is available and FALSE otherwise.