Identity

Identity()
Identity()
Identity()
Identity()
identity()
Identity()

Description

This function is deprecated as of API version 4. Use the CurrentIdentity function instead.

See the Deprecations page for more details.

The Identity function returns the ref of the document associated with the authentication token used for the request. If a document does not exist, an error is returned.

Parameters

None.

Returns

A reference type to the identity associated with the current client authentication token.

Examples

Not available in this language yet.
result, err := client.Query(
	f.Identity())

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
{1 0xc000170150 0xc000170150 <nil>}
System.out.println(
    client.query(
        Identity()
    ).get());
ref(id = "1", collection = ref(id = "users", collection = ref(id = "collections")))
client.query(
  q.Identity()
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
Ref(Collection("users"), "1")
Not available in this language yet.
Not available in this language yet.

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!