GitHub Blog Community Support
Start for Free
    • Home
      • What is Fauna?
      • Plans and billing
        • Plan details
        • Billing
      • Runtime environment
        • Requirements
        • Limits
      • Glossary
    • Get started
      • Dashboard quick start
      • Learn FQL in 10 minutes
      • Client driver quick start
    • Learn
      • Data model
        • Databases
        • Collections and documents
        • Sets
        • Indexes
        • User-defined functions
        • Transactions
        • Temporality
      • FQL basics cookbook
        • Fauna at-a-glance
        • Delete a field
        • Iterate on sets
        • Define relationships
        • Improve performance with indexes
        • Get query results one page at a time
        • Catch errors at compile time
        • Write custom logic with user-defined functions
      • Access control cookbook
        • Get started
        • Keys and built-in roles
        • Child database access
        • Impersonate database access
        • User-defined roles and keys
        • Login and logout
        • Tokens and role membership
        • Use an external identity provider (IdP)
    • FQL language reference
      • Lexical elements
      • Literals
      • Reserved words
      • Types
      • Variables and identifiers
      • Blocks and lexical scoping
      • Field accessors and method chaining
      • Operators
      • Operator precedence
      • Expressions and statements
      • Anonymous functions
      • Naming and aliasing
      • Projection and field aliasing
      • Static typing
      • Error codes
    • API reference
      • AccessProvider
        • AccessProvider document definition
        • Static Methods
        • AccessProvider.all()
        • AccessProvider.byName()
        • AccessProvider.create()
        • AccessProvider.firstWhere()
        • AccessProvider.where()
        • Instance Methods
        • delete()
        • exists()
        • replace()
        • update()
      • Array
        • Instance Properties
        • length
        • Instance Methods
        • aggregate()
        • any()
        • append()
        • at()
        • concat()
        • distinct()
        • drop()
        • entries()
        • every()
        • filter()
        • first()
        • firstWhere()
        • flatMap()
        • flatten()
        • fold()
        • foldRight()
        • forEach()
        • includes()
        • indexOf()
        • indexWhere()
        • isEmpty()
        • last()
        • lastIndexOf()
        • lastIndexWhere()
        • lastWhere()
        • map()
        • nonEmpty()
        • order()
        • prepend()
        • reduce()
        • reduceRight()
        • reverse()
        • slice()
        • take()
        • toSet()
        • toString()
        • where()
      • Collection
        • Collection document definition
        • Indexes definition
        • Unique constraints definition
        • Static Methods
        • Collection.all()
        • Collection.byName()
        • Collection.create()
        • Collection.firstWhere()
        • Collection.where()
        • Instance Properties
        • definition
        • Instance Methods
        • all()
        • byId()
        • create()
        • createData()
        • exists()
        • firstWhere()
        • where()
        • <indexName>()
      • Credential
        • Credential document definition
        • Static Methods
        • Credential.all()
        • Credential.byDocument()
        • Credential.byId()
        • Credential.create()
        • Credential.firstWhere()
        • Credential.where()
        • Instance Methods
        • delete()
        • exists()
        • login()
        • replace()
        • update()
        • verify()
      • Database
        • Database document definition
        • Static Methods
        • Database.all()
        • Database.byName()
        • Database.create()
        • Database.firstWhere()
        • Database.where()
      • Date
        • Instance properties
        • dayOfMonth
        • dayOfWeek
        • dayOfYear
        • month
        • year
        • Static Methods
        • Date()
        • Date.fromString()
        • Date.today()
        • Instance Methods
        • add()
        • difference()
        • subtract()
        • toString()
      • Document
        • Document fields
        • Instance Methods
        • delete()
        • exists()
        • replace()
        • replaceData()
        • update()
        • updateData()
      • Function
        • Function document definition
        • Static Methods
        • Function.all()
        • Function.byName()
        • Function.create()
        • Function.firstWhere()
        • Function.where()
        • Instance Properties
        • definition
      • Key
        • Key document definition
        • Static Methods
        • Key.all()
        • Key.byId()
        • Key.create()
        • Key.firstWhere()
        • Key.where()
        • Instance Methods
        • delete()
        • exists()
        • replace()
        • update()
      • Math
        • Static Properties
        • Math.E
        • Math.PI
        • Static Methods
        • Math.abs()
        • Math.acos()
        • Math.asin()
        • Math.atan()
        • Math.ceil()
        • Math.cos()
        • Math.cosh()
        • Math.degrees()
        • Math.exp()
        • Math.floor()
        • Math.hypot()
        • Math.ln()
        • Math.log()
        • Math.max()
        • Math.mean()
        • Math.min()
        • Math.pow()
        • Math.radians()
        • Math.round()
        • Math.sign()
        • Math.sin()
        • Math.sinh()
        • Math.sqrt()
        • Math.tan()
        • Math.tanh()
      • Object
        • Static Methods
        • Object.assign()
        • Object.entries()
        • Object.fromEntries()
        • Object.hasPath()
        • Object.keys()
        • Object.select()
        • Object.values()
      • Query
        • Query.identity()
        • Query.token()
      • Role
        • Role document definition
        • Static Methods
        • Role.all()
        • Role.byName()
        • Role.create()
        • Role.firstWhere()
        • Role.where()
        • Instance Methods
        • delete()
        • exists()
        • replace()
        • update()
      • Set
        • Static Methods
        • Set.paginate()
        • Instance Methods
        • aggregate()
        • any()
        • concat()
        • count()
        • distinct()
        • drop()
        • every()
        • first()
        • firstWhere()
        • flatMap()
        • fold()
        • foldRight()
        • forEach()
        • includes()
        • isEmpty()
        • last()
        • lastWhere()
        • map()
        • nonEmpty()
        • order()
        • paginate()
        • reduce()
        • reduceRight()
        • reverse()
        • sequence()
        • take()
        • toArray()
        • toString()
        • where()
      • String
        • Instance Properties
        • length
        • Instance Methods
        • at()
        • casefold()
        • concat()
        • endsWith()
        • includes()
        • includesRegex()
        • indexOf()
        • indexOfRegex()
        • insert()
        • lastIndexOf()
        • matches()
        • matchIndexes()
        • parseDouble()
        • parseInt()
        • parseLong()
        • parseNumber()
        • replace()
        • replaceAll()
        • replaceRegex()
        • slice()
        • split()
        • splitAt()
        • splitRegex()
        • startsWith()
        • toLowerCase()
        • toString()
        • toUpperCase()
      • Time
        • Instance properties
        • dayOfMonth
        • dayOfWeek
        • dayOfYear
        • hour
        • minute
        • month
        • second
        • year
        • Static Methods
        • Time()
        • Time.epoch()
        • Time.fromString()
        • Time.now()
        • Instance Methods
        • add()
        • difference()
        • subtract()
        • toMicros()
        • toMillis()
        • toSeconds()
        • toString()
      • Token
        • Token document definition
        • Static Methods
        • Token.all()
        • Token.byDocument()
        • Token.byId()
        • Token.create()
        • Token.firstWhere()
        • Token.where()
        • Instance Methods
        • delete()
        • exists()
        • replace()
        • update()
      • TransactionTime
        • Static Methods
        • TransactionTime()
      • Global functions
        • abort()
        • dbg()
        • log()
        • newId()
    • FSL reference
      • Introduction to FSL
      • Database entity syntax
    • HTTP API
      • User guide
      • Reference
        • query/1
          • POST
    • Drivers
      • Version strategy
      • Supported drivers and installation
      • Advanced driver topics
        • Dynamic queries and query composition
    • Tools
      • Fauna Dev
      • fauna-shell
        • Installation and configuration
        • Getting started
        • Topics and commands
          • Topics:plugins
          • plugins:inspect
          • plugins:install
          • plugins:link
          • plugins:uninstall
          • plugins:update
          • Topics:schema
          • schema:diff
          • schema:pull
          • schema:push
          • Commands
          • add-endpoint
          • cloud-login
          • create-database
          • create-key
          • default-endpoint
          • delete-database
          • delete-endpoint
          • delete-key
          • eval
          • help
          • import
          • list-databases
          • list-endpoints
          • list-keys
          • plugins
          • shell
      • Visual Studio Code extension
      • Query log
        • Dashboard operations
        • API automation
        • Reference
          • /api/v1/logs
          • /api/v1/logs/{requestId}
          • /api/v1/logs/{request_id}/url
          • /api/v1/logs/_list
          • Log record format
    • Administration
      • Region Groups
      • Team management
      • Multitenancy
      • Multifactor authentication
      • Backups
Fauna current
  • Fauna
    • current
    • v4
    • v3
  • API reference
  • Query

Query

Description

The Query namespace has security functions that return access information about a caller.

Static methods

Method Description

Query.identity()

Get the current identity.

Query.token()

Get the current token.

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!

Object.values() Query.identity()
Copyright © 2018–2023 Fauna, Inc.
Terms of use Privacy Policy ↑
×

Keyboard shortcuts

While reading

? or h
Shows this help.
/ or Alt+f or ⌘Control+K
Focus the search field.
←
Navigate to the previous page (higher up the TOC).
→
Navigate to the next page (lower down the TOC).
[
Switch to the previous language (to the left, wraps around).
]
Switch to the next language (to the right, wraps around).
t
Scroll to the top of the page.
b
Scroll to the bottom of the page.

While searching

Enter
Navigate to the highlighted search result.
Esc
Deselect the search field and hide the search results.
↑
Highlight the previous search result.
↓
Highlight the next search result.

URL fragments

Use the following URL fragments to scroll to parts of a page:

#/term
Scroll to the first instance of term on the page.
#Pn
Scroll to the nth paragraph on the page.
#Sn
Scroll the nth percentage of the page height.