Skip to main content

Function: actorMatchesClaims()

actorMatchesClaims(actor, claims): boolean

Defined in: packages/authz/src/actor-token.ts:196

Whether verified claims vouch for exactly this actor: the subject (or platform for the platform actor), the tenant, the scope path and the roles, in order. Nothing is widened or defaulted: an actor that differs in any field is not the one the gateway authenticated.

Parameters​

actor​

{ kind: "tenant"; roles: string[]; scopePath: string; subjectId: string; tenant: string; } | { kind: "platform"; roles: string[]; scopePath: "/"; subjectId: "00000000-0000-0000-0000-000000000000"; tenant: "platform"; }

The envelope's actor.

claims​

Claims verifyActorToken returned.

aud​

string = ...

exp​

number = SECONDS

iat​

number = SECONDS

jti​

string = ...

oktoid:roles​

string[] = ...

oktoid:scope​

string = ScopePath

oktoid:tenant​

string = Tenant

sub​

string = ...

Returns​

boolean

true only on an exact match.