Skip to main content

authz

Api Code Documentation / Exports / authz

Table of contents

Functions

Functions

authorized

authorized(token, intent): (resourcePermissions: Permissions) => Promise<undefined>

Parameters

NameType
tokenAuthToken
intentdefault

Returns

fn

▸ (resourcePermissions): Promise<undefined>

Parameters
NameType
resourcePermissionsPermissions
Returns

Promise<undefined>

Defined in

src/authz/index.ts:69


getAllowedIntents

getAllowedIntents(userAndGroups, resourcePermissions): default[]

Parameters

NameType
userAndGroupsPeople
resourcePermissionsPermissions

Returns

default[]

Defined in

src/authz/index.ts:21


getUserAndGroups

getUserAndGroups(token): string[]

Parameters

NameType
tokenObject
token.groupsstring[]
token.userIdstring

Returns

string[]

Defined in

src/authz/index.ts:17


hasIntersection

hasIntersection(actualGroups, allowedGroups): boolean

Parameters

NameType
actualGroupsany
allowedGroupsany

Returns

boolean

Defined in

src/authz/index.ts:14


throwIfUnauthorized

throwIfUnauthorized(token, intent, permissions): Promise<undefined>

Parameters

NameType
tokenAuthToken
intentdefault
permissionsPermissions

Returns

Promise<undefined>

Defined in

src/authz/index.ts:78