Minting a token
When your agent makes its first call to a platform, the SDK requests a token from MudraID, presenting the agent’s credentials. MudraID returns a signed token (a JWT) that:- is signed by MudraID with a private key only it holds,
- expires in about 15 minutes, and
- carries the scopes the agent holds for that one platform.
Verifying a token
When the request reaches the platform, the middleware verifies the token by itself — no callback to MudraID on each request. It checks:| Check | What it confirms |
|---|---|
| Signature | The token was issued by MudraID and hasn’t been tampered with. |
Issuer (iss) | It was issued by MudraID (the default issuer is mudraid-identity), not someone else. |
Audience (aud) | It was minted for this platform specifically. |
Timing (exp / nbf / iat) | It’s within its valid window — not expired, not used early. |
mudraid-identity. During an issuer migration, operators can configure it to accept a set of issuers — see middleware configuration.
Why the algorithm is pinned
The middleware only accepts tokens signed with MudraID’s asymmetric algorithm (RS256). It rejects anything else — including classic JWT attacks that try to downgrade the algorithm or pass an unsigned token. This check happens before any signature work, so a malformed or hostile token is thrown out immediately.Verification keys (JWKS)
To verify signatures, the middleware needs MudraID’s public keys. MudraID publishes them at a well-known URL (a JWKS endpoint). The middleware fetches them once and caches them, so steady-state verification is local and fast. Public keys verify; they can’t sign. Publishing them is safe — only MudraID can mint tokens, but anyone can check them.Key rotation is automatic
MudraID rotates its signing keys periodically. When a token arrives signed by a key the middleware hasn’t seen, the middleware fetches the latest keys, finds the new one, and verifies — with no downtime and no action from you. See Survive key rotation.Tokens are bound to one platform
The audience (aud) claim ties a token to a single platform. A token minted for platform A is rejected by platform B, even though both trust MudraID. So a token captured on its way to one platform can’t be replayed against another.
Example. Your agent calls both an airline and a bank. The SDK mints a separate token for each, scoped and audience-bound to that platform. The bank’s middleware will not accept a token meant for the airline.

