jwt_claim: Generate claim

Description Usage Arguments

View source: R/claim.R

Description

Helper function to create a named list used as the claim of a JWT payload. See https://tools.ietf.org/html/rfc7519#section-4.1 for details.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
jwt_claim(
  iss = NULL,
  sub = NULL,
  aud = NULL,
  exp = NULL,
  nbf = NULL,
  iat = Sys.time(),
  jti = NULL,
  ...
)

Arguments

iss

(Issuer) Claim, should be rfc7519 'StringOrURI' value

sub

(Subject) Claim, should be rfc7519 'StringOrURI' value

aud

(Audience) Claim, should contain one or rfc7519 'StringOrURI' values

exp

(Expiration Time) Claim, should be rfc7519 'NumericDate' value; R POSIXct values are automatically coerced.

nbf

(Not Before) Claim, should be rfc7519 'NumericDate' value; R POSIXct values are automatically coerced.

iat

(Issued At) Claim, should be rfc7519 'NumericDate' value; R POSIXct values are automatically coerced.

jti

(JWT ID) Claim, optional unique identifier for the JWT

...

additional custom claims to include


jeroen/jose documentation built on Nov. 11, 2021, 4:17 p.m.