Resolves the tenant id from a claim in an unverified JWT payload.
Security note: This resolver uses unverified decode — tenant identity
is taken from an unsigned token claim. An application using this without
auth middleware must understand a client could spoof the tenant claim.
Example
constresolver = newJwtResolver({ claim:'tenant_id' }); constresult = awaitresolver.resolve(request); // => some({ id: 'acme' }) when payload has tenant_id='acme'
Resolves the tenant id from a claim in an unverified JWT payload.
Security note: This resolver uses unverified decode — tenant identity is taken from an unsigned token claim. An application using this without auth middleware must understand a client could spoof the tenant claim.
Example