Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

jwt_signature

Generate a JWT signature given credentials.


Description

Usage

jwt_signature(
  credentials,
  scope,
  aud,
  sub = NULL,
  iat = as.integer(Sys.time()),
  exp = iat + duration,
  duration = 60L * 60L
)

Arguments

credentials

Parsed contents of the credentials file.

scope

A space-delimited list of the permissions that the application requests.

aud

A descriptor of the intended target of the assertion. This typically comes from the service auth file.

sub

The email address of the user for which the application is requesting delegated access.

iat

The time the assertion was issued, measured in seconds since 00:00:00 UTC, January 1, 1970.

exp

The expiration time of the assertion, measured in seconds since 00:00:00 UTC, January 1, 1970. This value has a maximum of 1 hour from the issued time.

duration

Duration of token, in seconds.

iss

Email address of the client_id of the application making the access token request.

Examples

## Not run: 
cred <- jsonlite::fromJSON("~/Desktop/httrtest-45693cbfac92.json")
jwt_signature(cred, "https://www.googleapis.com/auth/userinfo.profile")

## End(Not run)

httr

Tools for Working with URLs and HTTP

v1.4.2
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.