View source: R/BearerTokenManagement.R
rd_VerifyToken | R Documentation |
The 'rd_VerifyToken' function checks whether a given JWT (JSON Web Token) is still valid by inspecting its expiration time (‘exp' claim). It decodes the token’s payload without verifying its signature.
rd_VerifyToken(token)
token |
A character string representing the JWT access token. |
A logical value:
if the token is valid (i.e., not expired).
if the token is expired or invalid.
## Not run:
# Example token (replace with a real token)
access_token <- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
is_valid <- rd_VerifyToken(access_token)
print(is_valid)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.