Page Contents
Home > @loopback/authentication-passport
authentication-passport package
An adapter to plug in passport based strategies to the authentication system in @loopback/authentication @3.x.
Remarks
@loopback/authentication @3.x allows users to register authentication strategies that implement the interface AuthenticationStrategy
.
Since AuthenticationStrategy describes a strategy with different contracts than the passport Strategy, and we’d like to support the existing 500+ community passport strategies, an adapter class is created in this package to convert a passport strategy to the one that LoopBack 4 authentication system wants.
Classes
Class | Description |
---|---|
StrategyAdapter | Adapter class to invoke passport-strategy 1. provides express dependencies to the passport strategies 2. provides shimming of requests for passport authentication 3. provides life-cycle similar to express to the passport-strategy 4. provides state methods to the strategy instance see: https://github.com/jaredhanson/passport |