Reference

AuthorizationResult

Reports whether claims satisfy an authorization policy and why they fail.

Signature

type AuthorizationResult = { authorized: true } | { authorized: false; reason: "missing-permission" | "missing-role" }