authz
Api Code Documentation / Exports / authz
Table of contents
Functions
Functions
authorized
▸ authorized(token
, intent
): (resourcePermissions
: Permissions
) => Promise
<undefined
>
Parameters
Name | Type |
---|---|
token | AuthToken |
intent | default |
Returns
fn
▸ (resourcePermissions
): Promise
<undefined
>
Parameters
Name | Type |
---|---|
resourcePermissions | Permissions |
Returns
Promise
<undefined
>
Defined in
getAllowedIntents
▸ getAllowedIntents(userAndGroups
, resourcePermissions
): default
[]
Parameters
Name | Type |
---|---|
userAndGroups | People |
resourcePermissions | Permissions |
Returns
default
[]
Defined in
getUserAndGroups
▸ getUserAndGroups(token
): string
[]
Parameters
Name | Type |
---|---|
token | Object |
token.groups | string [] |
token.userId | string |
Returns
string
[]
Defined in
hasIntersection
▸ hasIntersection(actualGroups
, allowedGroups
): boolean
Parameters
Name | Type |
---|---|
actualGroups | any |
allowedGroups | any |
Returns
boolean
Defined in
throwIfUnauthorized
▸ throwIfUnauthorized(token
, intent
, permissions
): Promise
<undefined
>
Parameters
Name | Type |
---|---|
token | AuthToken |
intent | default |
permissions | Permissions |
Returns
Promise
<undefined
>