Page Contents

Home > @loopback/authentication > StrategyAdapter

StrategyAdapter class

Warning: This API is now obsolete.

THIS CLASS IS DEPRECATED. We will be adding a new package to implement one or more new passport strategy adapters.

Adapter class to invoke passport-strategy 1. provides express dependencies to the passport strategies 2. provides shimming of requests for passport authentication 3. provides lifecycle similar to express to the passport-strategy 3. provides state methods to the strategy instance see: https://github.com/jaredhanson/passport

Signature:

export declare class StrategyAdapter 

Constructors

Constructor Modifiers Description
(constructor)(strategy)   Constructs a new instance of the StrategyAdapter class

Methods

Method Modifiers Description
authenticate(request)   The function to invoke the contained passport strategy. 1. Create an instance of the strategy 2. add success and failure state handlers 3. authenticate using the strategy