Here followeth the register of key-holders, and the instruments of the Keeper's office — 60 features in all.
Custom Claims
A formula for the scribe, to be copied into functions.php
Add custom claims to JWT tokens using WordPress filters.
add_filter('jwt_auth_token_before_sign',
function($token, $user) {
$token['customer_type'] =
get_user_meta($user->ID, 'customer_type', true);
$token['loyalty_points'] =
get_user_meta($user->ID, 'loyalty_points', true);
$token['preferred_currency'] =
get_user_meta($user->ID, 'currency', true);
return $token;
}, 10, 2);
The Chronicle
Security Audit Trail
Complete compliance logging with full context. One entry, as the chronicle keepeth it:
- Created
- June 13, 2025 3:08 am
- IP
- 110.11.194.83
- User agent
- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Chrome/124
- Hash
- bb414972b6df2f5a902...
- User
- John Doe (ID 1)
- Last used
- June 13, 2025 3:08 am
- Revoked
- June 13, 2025 3:08 am
Three Standing Edicts
Automatic Revocation Policies
Tokens auto-revoke on password change, email change, or role change. One compromised account doesn't mean open API access. Each edict may be set or lifted on its own.
The Keeper's Ledger
Admin Configuration Interface
Aside from the secret key in wp-config.php, every setting is kept in WordPress admin.
The Watch at the Gate
Rate Limiting & Security Headers
IP-based rate limiting at 60 requests per minute (configurable), answered with HTTP 429 when exceeded. Security headers are set automatically on every response. No nginx config required.
HSTSX-Frame-OptionsX-Content-Type-OptionsXSS-Protection
The Reckoning
Usage Analytics
Authentication events, success and failure rates, response times, and geographic distribution — reckoned over 7-day, 30-day, and 90-day windows.
Signing algorithms, chosen from the settings UI
HS256/384/512RS256/384/512ES256/384/512PS256/384/512EdDSA
Three Offices, Any Client
Works with React, Vue, Flutter, mobile apps, or any client.
Generate Token
POST /wp-json/jwt-auth/v1/tokenAuthenticate users and issue tokens with a single API call.
Validate Token
/wp-json/jwt-auth/v1/token/validateSignature check, claims validation, expiration status.
Refresh Token
/wp-json/jwt-auth/v1/token/refreshAuto renewal, lifecycle management, session continuity.