Accountmaker Docs
Features

Backend Integration

Token verification via JWKS and OIDC discovery for your backend services.

backend jwt jwks verification oidc

Backend Integration

AM exposes public keys via JWKS and configuration via OIDC discovery—standard protocols that any JWT library can use.

Verify tokens locally, trust the claims, and authorize requests.

Token Verification Flow

AMYour BackendClientAMYour BackendClientGET /.well-known/jwks.json?client_id=... (cached)Public keysRequest + Bearer tokenVerify JWT signature locallyCheck exp, aud, scopeResponse

Endpoints

EndpointPurpose
/.well-known/jwks.json?client_id=...Public signing keys
/.well-known/openid-configuration?client_id=...OIDC discovery document
/oauth2/introspectRefresh token introspection

JWKS

Retrieve public keys for local verification. The client_id query parameter is required:

GET /.well-known/jwks.json?client_id=cid_...
{
  "keys": [
    {
      "kty": "RSA",
      "use": "sig",
      "kid": "key_...",
      "alg": "RS256",
      "n": "0vx7agoebG...",
      "e": "AQAB"
    }
  ]
}

Multiple keys may be present during rotation. Match by kid claim in JWT header.

OIDC Discovery

Auto-configure clients with the discovery document:

GET /.well-known/openid-configuration?client_id=cid_...

Returns endpoints, supported algorithms, and capabilities per OpenID Connect Discovery spec.

JWT Claims

Verified tokens contain:

ClaimDescription
issIssuer URL
subSubject (user ID or client ID)
audIntended audience
expExpiration (Unix timestamp)
iatIssued at (Unix timestamp)
scopeGranted permissions
cidClient ID
appApplication ID
accCurrent account ID
uidUser ID (when user-authenticated)
roleRole in current account

Caching

  • Cache JWKS responses (use ETag/If-None-Match)
  • Refresh on signature verification failure (key rotation)
  • Typical TTL: 1 hour

Token Introspection

For refresh tokens or when you need authoritative validation:

POST /oauth2/introspect
Content-Type: application/x-www-form-urlencoded

token=...&client_id=...&client_secret=...

Returns active: true/false and token claims. Access tokens are JWTs and should be verified locally via JWKS when possible.