---
lang: en
title: 'API docs: authentication.registerauthenticationstrategy'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/authentication
permalink: /doc/en/lb4/apidocs.authentication.registerauthenticationstrategy.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/authentication](./authentication.md) &gt; [registerAuthenticationStrategy](./authentication.registerauthenticationstrategy.md)

## registerAuthenticationStrategy() function

Registers an authentication strategy as an extension of the AuthenticationBindings.AUTHENTICATION\_STRATEGY\_EXTENSION\_POINT\_NAME extension point.

**Signature:**

```typescript
export declare function registerAuthenticationStrategy(context: Context, strategyClass: Constructor<AuthenticationStrategy>): Binding<unknown>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

context


</td><td markdown="1">

[Context](./context.context.md)


</td><td markdown="1">

Context object


</td></tr>
<tr><td markdown="1">

strategyClass


</td><td markdown="1">

[Constructor](./context.constructor.md)<!-- -->&lt;[AuthenticationStrategy](./authentication.authenticationstrategy.md)<!-- -->&gt;


</td><td markdown="1">

Class for the authentication strategy


</td></tr>
</tbody></table>

**Returns:**

[Binding](./context.binding.md)<!-- -->&lt;unknown&gt;


