@loopback/docs
Version:
Documentation for LoopBack 4
41 lines (28 loc) • 1.59 kB
Markdown
lang: en
title: 'API docs: authentication.strategyadapter'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.authentication.strategyadapter.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/authentication](./authentication.md) > [StrategyAdapter](./authentication.strategyadapter.md)
## 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
>
<b>Signature:</b>
```typescript
export declare class StrategyAdapter
```
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(strategy)](./authentication.strategyadapter.(constructor).md) | | Constructs a new instance of the <code>StrategyAdapter</code> class |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [authenticate(request)](./authentication.strategyadapter.authenticate.md) | | 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 |