Page Contents

Home > @loopback/authentication-passport > StrategyAdapter

StrategyAdapter class

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 4. provides state methods to the strategy instance see: https://github.com/jaredhanson/passport

Signature:

export declare class StrategyAdapter implements AuthenticationStrategy 

Constructors

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

Properties

Property Modifiers Type Description
name   string  

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