Validate
Validate a token for authenticity and claims.
osapi controller token validate [flags]
Examples
osapi controller token validate --token -
Result
The command prints:
$ osapi controller token validate --token - Token: Key ID: 2026-11 Subject: user123 Roles: read Effective permissions: file:read, health:read, status:read Audience: osapi Issued at: 2026-01-15 09:00:00 Expires at: 2026-04-15 09:00:00
With --json, the command prints:
{
"kid": "2026-11",
"subject": "user123",
"roles": ["read"],
"effective_permissions": ["file:read", "health:read", "status:read"],
"audience": ["osapi"],
"issued_at": "2026-01-15T09:00:00Z",
"expires_at": "2026-04-15T09:00:00Z"
}
Flags
| Flag | Description | Default |
|---|---|---|
-t, --token | The token (a secret: secret://<vault>/<key>, or - to read it from standard input) (required) |
Global flags
| Flag | Description | Default |
|---|---|---|
-d, --debug | Enable or disable debug mode | |
-j, --json | Enable JSON output | |
-f, --osapi-file | Path to config file; without one at the default path, osapi runs on the defaults | /etc/osapi/osapi.yaml |
Output tells how the result is printed, and what --json
gives.