---
lang: en
title: 'API docs: authentication-passport.strategyadapter'
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.strategyadapter.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/authentication-passport](./authentication-passport.md) &gt; [StrategyAdapter](./authentication-passport.strategyadapter.md)

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

**Signature:**

```typescript
export declare class StrategyAdapter<U> implements AuthenticationStrategy 
```
**Implements:** [AuthenticationStrategy](./authentication.authenticationstrategy.md)

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(strategy, name, userProfileFactory)](./authentication-passport.strategyadapter._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `StrategyAdapter` class


</td></tr>
</tbody></table>

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[name](./authentication-passport.strategyadapter.name.md)


</td><td>

`readonly`


</td><td>

string


</td><td>


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[authenticate(request, options)](./authentication-passport.strategyadapter.authenticate.md)


</td><td>


</td><td>

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


</td></tr>
</tbody></table>

