Skip to main content

Function: Auth()

Auth(strategies, require?): (target, propertyKey, descriptor) => void

Defined in: service-core/src/decorators/RouteDecorators.ts:88

Applies authentication to the decorated route or method for the provided strategy or list of strategies should be attempted before processing the route.

Parameters

strategies

string | string[]

The strategies that will be applied when incoming requests are processed.

require?

boolean = true

Set to true to indicate that at least one of the specified authentication strategies must pass to proceed, otherwise set to false. Default is true.

Returns

(target, propertyKey, descriptor) => void