Description Usage Arguments Details Value See Also
Get raw access token (which is a JWT object)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | decode_jwt(token, ...)
## S3 method for class 'AzureToken'
decode_jwt(token, type = c("access", "id"), ...)
## S3 method for class 'Token'
decode_jwt(token, type = c("access", "id"), ...)
## S3 method for class 'character'
decode_jwt(token, ...)
extract_jwt(token, ...)
## S3 method for class 'AzureToken'
extract_jwt(token, type = c("access", "id"), ...)
## S3 method for class 'Token'
extract_jwt(token, type = c("access", "id"), ...)
## S3 method for class 'character'
extract_jwt(token, ...)
|
token |
A token object. This can be an object of class |
... |
Other arguments passed to methods. |
type |
For the |
An OAuth token is a JSON Web Token, which is a set of base64URL-encoded JSON objects containing the token credentials along with an optional (opaque) verification signature. decode_jwt
decodes the credentials into an R object so they can be viewed. extract_jwt
extracts the credentials from an R object of class AzureToken
or httr::Token
.
Note that decode_jwt
does not touch the token signature or attempt to verify the credentials. You should not rely on the decoded information without verifying it independently. Passing the token itself to Azure is safe, as Azure will carry out its own verification procedure.
For extract_jwt
, the character string containing the encoded token, suitable for including in a HTTP query. For decode_jwt
, a list containing up to 3 components: header
, payload
and signature
.
jwt.io, the main JWT informational site
jwt.ms, Microsoft site to decode and explain JWTs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.