Logout

Logout( all_tokens )
Logout( all_tokens )
Logout( all_tokens )
Logout( all_tokens )
logout( all_tokens )
Logout( all_tokens )

Description

The Logout function deletes all tokens associated with the current identity if its parameter is true, or just the token used in this request otherwise.

Parameters

Argument Type Definition and Requirements

all_tokens

Boolean

When set to true, all authentication tokens for the current identity are deleted. When set to false, only the token used during the Logout query is deleted.

Returns

A boolean value indicating whether the logout was successful or not. A value of true indicates that the token or tokens are no longer valid. A value of false means Logout was called with a key and so there’s no way for tokens to be invalidated.

Examples

client.Query(Logout(true));
false
curl https://db.fauna.com/ \
    -u fnAChGwBcAACAO70ziE0cfROosNJHdgBmJU1PgpL: \
    -d '{ "logout": true }'
HTTP/1.1 200 OK
{ "resource": false }
result, _ := client.Query(f.Logout(true))

fmt.Println(result)
false
System.out.println(client.query(Logout(Value(true))).get());
false
client.query(q.Logout(true))
.then((ret) => console.log(ret))
true
client.query(q.logout(True))
false
client.query(Logout(true))
false

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve!
Visit Fauna's Discourse forums or email docs@fauna.com

Thank you for your feedback!