Check out v4 of the Fauna CLI
v4 of the Fauna CLI is now in beta. The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start. |
Query.token()
Get the Token
document or
JWT payload for the query’s
authentication secret.
Description
Gets the Token
document or
JWT payload for the query’s
authentication secret.
If the secret is a token, the method returns
the token’s Token
system collection
document. 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: "412664453937496576",
coll: Token,
ts: Time("2099-07-06T19:11:13.570Z"),
document: Customer("111")
}
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!