UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

31 lines (19 loc) 1.62 kB
--- lang: en title: 'API docs: authentication-passport' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/extensions/authentication-passport permalink: /doc/en/lb4/apidocs.authentication-passport.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/authentication-passport](./authentication-passport.md) ## authentication-passport package An adapter to plug in passport based strategies to the authentication system in [@loopback/authentication @3.x](./authentication.md)<!-- -->. ## Remarks [@loopback/authentication @3.x](./authentication.md) 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](./authentication-passport.strategyadapter.md) | 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 |