Skip to main content

Function: RequiresScope()

RequiresScope(scope): (target, propertyKey) => void

Defined in: core/src/decorators/ObjectDecorators.ts:110

Indicates that the client's token must carry at least one of the specified OAuth-style scope(s) to have read access to the decorated property. When a client does not have the defined scope the property is removed from the final object construction.

Parameters

scope

string | string[]

The scope that the authenticated user's token must carry to read the property.

Returns

(target, propertyKey) => void