Authentication · Verified identity
Basic, Bearer, OAuth and authorisation
A token does not grant every resource.
Understand the concept
Basic uses base64 encoding, not encryption, so secure transport is necessary. Bearer tokens can be used by whoever possesses them within their authority. Never put them in URLs or public logs. Signed JWT contents are not automatically encrypted.
OAuth delegates authorisation; OpenID Connect adds identity functionality. PKCE, validated redirect URIs, state/nonce and token checks have distinct roles. Validate issuer, audience, expiry and signature where appropriate.
Then enforce resource-level access: a valid User role does not grant another user’s order. Design logout, refresh and revocation. These examples show contracts without real secrets.
Separate authentication from resource access.
Equating JWT decoding with validation.
One topic. Three levels of depth.
Authorization: Bearer <example-token>A placeholder; never publish real tokens.
This page does not send requests to external servers. Messages are readable HTTP/1.1 illustrations, not HTTP/2 or HTTP/3 wire dumps. example.test is reserved for examples. Run commands and JavaScript only in your own test environment; never publish real tokens or cookies.
Try it yourself first.
Does a signed JWT containing email prove encryption?
Show the solution and explanation
Signature ≠ encryptionNo; a signature provides validation properties, not content confidentiality.