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:66


getAllowedIntents#

getAllowedIntents(userAndGroups, resourcePermissions): default[]

Parameters#

NameType
userAndGroupsPeople
resourcePermissionsPermissions

Returns#

default[]

Defined in#

src/authz/index.ts:19


getUserAndGroups#

getUserAndGroups(token): string[]

Parameters#

NameType
tokenObject
token.groupsstring[]
token.userIdstring

Returns#

string[]

Defined in#

src/authz/index.ts:15


hasIntersection#

hasIntersection(actualGroups, allowedGroups): boolean

Parameters#

NameType
actualGroupsany
allowedGroupsany

Returns#

boolean

Defined in#

src/authz/index.ts:12


throwIfUnauthorized#

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

Parameters#

NameType
tokenAuthToken
intentdefault
permissionsPermissions

Returns#

Promise<undefined>

Defined in#

src/authz/index.ts:76