open-vault/website/pages/docs/commands/token/lookup.mdx
Jeff Escalante 4f87851926 [website] Link Cleaning (#8205)
* update dependencies

* remove hard-coded vaultproject.io on local links

* remove 'index.html' from internal links

* remove '.html' at end of internal links

* manual review cleanup

Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
2020-01-22 12:05:41 -08:00

52 lines
1.4 KiB
Plaintext

---
layout: docs
page_title: token lookup - Command
sidebar_title: <code>lookup</code>
description: |-
The "token lookup" displays information about a token or accessor. If a TOKEN
is not provided, the locally authenticated token is used.
---
# token lookup
The `token lookup` displays information about a token or accessor. If a TOKEN is
not provided, the locally authenticated token is used.
## Examples
Get information about the locally authenticated token (this uses the
`/auth/token/lookup-self` endpoint and permission):
```text
$ vault token lookup
```
Get information about a particular token (this uses the `/auth/token/lookup`
endpoint and permission):
```text
$ vault token lookup 96ddf4bc-d217-f3ba-f9bd-017055595017
```
Get information about a token via its accessor:
```text
$ vault token lookup -accessor 9793c9b3-e04a-46f3-e7b8-748d7da248da
```
## Usage
The following flags are available in addition to the [standard set of
flags](/docs/commands) included on all commands.
### Output Options
- `-format` `(default: "table")` - Print the output in the given format. Valid
formats are "table", "json", or "yaml". This can also be specified via the
`VAULT_FORMAT` environment variable.
### Command Options
- `-accessor` `(bool: false)` - Treat the argument as an accessor instead of a
token. When this option is selected, the output will NOT include the token.