HasIdentity

HasIdentity()
HasIdentity()
HasIdentity()
HasIdentity()
has_identity()
HasIdentity()

Description

The HasIdentity function returns true if the current client authentication credentials have an associated identity, and false if they don’t.

Parameters

None.

Returns

A boolean indicating whether the current client credentials are associated with an identity.

Examples

// Not available in this language yet.
false
curl https://db.fauna.com/ \
    -u fnAChGwBcAACAO70ziE0cfROosNJHdgBmJU1PgpL: \
    -d '{ "has_identity": null }'
HTTP/1.1 200 OK
{ "resource": false }
result, _ := client.Query(f.HasIdentity())

fmt.Println(result)
false
System.out.println(
   client.query(HasIdentity()).get());
false
client.query(q.HasIdentity())
.then((ret) => console.log(ret))
false
# Not available in this language yet.
false
// Not available in this language yet.
false

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!