Identify

This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics.

Identify( identity, password )
Identify( identity, password )
Identify( identity, password )
identify( identity, password )
Identify( identity, password )

Description

The Identify function checks the given password against the identity's credentials, returning true if the credentials are valid, or false otherwise. An identity is a Reference for a document that has associated credentials.

Identify allows you to verify an identity’s credentials without calling the Login function and creating a new access token.

Parameters

Parameter Type Definition and Requirements

identity

Reference

The identity whose credentials should be checked.

password

String

The password to check.

Returns

A boolean value indicating whether the password is valid for the specified identity.

Examples

try
{
    Value result = await client.Query(
        Identify(
            Ref(Collection("characters"), "181388642114077184"),
            "abracadabra"
        )
    );
    Console.WriteLine(result);
}
catch (Exception e)
{
    Console.WriteLine($"ERROR: {e.Message}");
}
BooleanV(True)
result, err := client.Query(
	f.Identify(
		f.Ref(f.Collection("characters"), "181388642114077184"),
		"abracadabra"))

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
true
client.query(
  q.Identify(
    q.Ref(q.Collection('characters'), '181388642114077184'),
    'abracadabra',
  )
)
.then((ret) => console.log(ret))
.catch((err) => console.error(
  'Error: [%s] %s: %s',
  err.name,
  err.message,
  err.errors()[0].description,
))
true
result = client.query(
  q.identify(
    q.ref(q.collection("characters"), "181388642114077184"),
    "abracadabra"
  )
)
print(result)
True
Identify(
  Ref(Collection('characters'), '181388642114077184'),
  'abracadabra',
)
true
Query metrics:
  •    bytesIn:  99

  •   bytesOut:  17

  • computeOps:   1

  •    readOps:   1

  •   writeOps:   0

  •  readBytes: 214

  • writeBytes:   0

  •  queryTime: 8ms

  •    retries:   0

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!