Authentication Schemes¶
Each page in this section follows the same structure so you can compare schemes directly:
- What it is — definition and the governing specification
- How it works — the request/response flow on the wire
- Reference implementation — working code in Python and Java
- Strengths & weaknesses — honest trade-offs
- Common attacks & mitigations — what goes wrong in production
- When to use / avoid — decision guidance
| Page | One-line summary |
|---|---|
| Basic Auth | username:password, Base64-encoded, sent on every request |
| Token Auth | Opaque key or bearer token validated against a server-side store |
| JWT | Self-contained signed claims; verified without a server lookup |
| OAuth 2.0 | Delegated authorization framework issuing access tokens |
| Session Auth | Stateful server-side session referenced by a cookie |
| MFA | Two+ factor categories at login; acr/amr claims carry the result to APIs |
| Enterprise SSO | SAML/OIDC federation plus LDAP/AD/Kerberos directory backends |
| Passkeys & WebAuthn | Origin-bound public-key credentials — phishing-resistant by construction |
| Mutual TLS | Both parties present certificates; workload identity via SPIFFE/SPIRE |
| Request Signing | HMAC over a canonical request — webhook verification and replay defense |