Skip to content

r.claimKey(...)

r.claimKey(shortName, { type }) — declares a session-claim key, qualified to <feature>:<shortName> (no kebab conversion — it would break the claim round-trip), and returns a typed handle for readClaim(user, handle). Declaring keys also enables typo-drift protection: r.authClaims hooks returning an undeclared inner key log a warning (the claim still lands in the JWT — this is not strict mode).


From packages/framework/src/engine/feature-ast/patterns.ts -> ClaimKeyPattern