Page Contents

Home > @loopback/authentication > authenticate

authenticate() function

Mark a controller method as requiring authenticated user.

Signature:

export declare function authenticate(strategyName: string, options?: object): MethodDecorator;

Parameters

Parameter Type Description
strategyName string The name of the authentication strategy to use.
options object Additional options to configure the authentication.

Returns:

MethodDecorator