JSON Web Token (JWT)
ID jwt
DatatypeNot PIIidentifierDraft
This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).
Compact JSON Web Token (RFC 7519) signed with JWS: three Base64url parts (header, claims and signature) separated by dots. The header and the claims are JSON objects, so both parts start with ey. Used as bearer access tokens and ID tokens; the encrypted JWE form has five parts and is not covered.
- Categories
- Secrets and credentials (passwords, keys, tokens)
- Countries
- Global (not tied to a country)
- Languages
- Common to most languages
- Quality
- 78/100 · missing: second example, mapping (Wikidata, Schema.org, ...), translation
- Metacrafter rules
- no detection rule yet
- Supported by tools
- Amazon Macie, detect-secrets, Gitleaks, Nightfall AI, Semgrep, TruffleHog
Regular expression
^ey[A-Za-z0-9_-]+\.ey[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*$
Python re syntax.
Examples
| Value | Description |
|---|---|
| eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk | Example JWT from RFC 7519, section 3.1 |
| eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9 invalid | Header part alone |
Sources
- doc: https://www.rfc-editor.org/rfc/rfc7519
- wikipedia: https://en.wikipedia.org/wiki/JSON_Web_Token
- other: https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml
Use this record
- Page URL:
http://registry.apicrafter.io/datatype/jwt - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/secrets/jwt.yamlon GitHub