@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
36 lines (23 loc) • 1.39 kB
Markdown
---
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) > [@loopback/authentication](./authentication.md) > [registerAuthenticationStrategy](./authentication.registerauthenticationstrategy.md)
## registerAuthenticationStrategy() function
Registers an authentication strategy as an extension of the AuthenticationBindings.AUTHENTICATION\_STRATEGY\_EXTENSION\_POINT\_NAME extension point.
<b>Signature:</b>
```typescript
export declare function registerAuthenticationStrategy(context: Context, strategyClass: Constructor<AuthenticationStrategy>): Binding<unknown>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| context | [Context](./context.context.md) | Context object |
| strategyClass | [Constructor](./context.constructor.md)<!-- --><[AuthenticationStrategy](./authentication.authenticationstrategy.md)<!-- -->> | Class for the authentication strategy |
<b>Returns:</b>
[Binding](./context.binding.md)<!-- --><unknown>