Identify

Identify( identity, password )
Identify( identity, password )
Identify( identity, password )
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 ref’s credentials, returning true if the credentials are valid, or false otherwise.

Parameters

Argument Type Definition and Requirements

identity

Number

The identity whose credentials should be checked.

password

String

The password to check.

Returns

A boolean value indicating whether the password is valid.

Examples

curl https://db.fauna.com/ \
    -u fnAChGwBcAACAO70ziE0cfROosNJHdgBmJU1PgpL: \
    -d '{
          "identify": { "@ref": "classes/characters/181388642114077184" },
          "password": "abracadabra"
        }'
client.Query(
  Identify(
    Ref("classes/characters/181388642114077184"),
    "abracadabra"));
System.out.println(
         client.query(
             Identify(
               Ref(Class("characters"), Value(181388642114077184L)),
               Value("abracadabra")))
         .get());
result, _ := client.Query(
    f.Identify(
        f.RefClass(f.Class("characters"), "181388642114077184"),
        "abracadabra",
    ),
)

fmt.Println(result)
client.query(
  Identify(
    Ref("classes/characters/181388642114077184"),
    "abracadabra"))
client.query(
  q.identify(
    Ref("classes/characters/181388642114077184"),
    "abracadabra"
  ))
$client.query do
  identify ref('classes/characters/181388642114077184'),
           'abracadabra'
end
client.query(
    Identify(
        ref: Ref("classes/characters/181388642114077184"),
        password: "abracadabra"
    )
)
client.query(
  q.Identify(q.Ref(q.Class("characters"), "181388642114077184"), "abracadabra"))
.then((ret) => console.log(ret))
HTTP/1.1 200 OK
{ "resource": true }
true
true
true
true
true
true
true
true

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!