Query.token()
Get the authentication secret’s token document or JWT payload.
Description
The token()
method gets the token document or JWT payload for the
authentication secret.
If the secret is a token, the method
returns the token’s document from the native Token
collection. This token
document is distinct from the token’s identity document.
If the secret is a JWT, the method returns the JWT’s payload.
If the secret is a key, the method returns
null
.
Examples
Query.token()
{
id: "369530580236238881",
coll: Token,
ts: Time("2023-07-06T19:11:13.570Z"),
document: Customer.byId("369515102952488993")
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!