@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
81 lines (41 loc) • 1.59 kB
Markdown
---
lang: en
title: 'API docs: authentication.getauthenticationmetadataforstrategy'
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.getauthenticationmetadataforstrategy.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/authentication](./authentication.md) > [getAuthenticationMetadataForStrategy](./authentication.getauthenticationmetadataforstrategy.md)
## getAuthenticationMetadataForStrategy() function
Get the authentication metadata object for the specified strategy.
**Signature:**
```typescript
export declare function getAuthenticationMetadataForStrategy(metadata: AuthenticationMetadata[], strategyName: string): AuthenticationMetadata | undefined;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
metadata
</td><td markdown="1">
[AuthenticationMetadata](./authentication.authenticationmetadata.md)<!-- -->\[\]
</td><td markdown="1">
Array of authentication metadata objects
</td></tr>
<tr><td markdown="1">
strategyName
</td><td markdown="1">
string
</td><td markdown="1">
Name of the authentication strategy
</td></tr>
</tbody></table>
**Returns:**
[AuthenticationMetadata](./authentication.authenticationmetadata.md) \| undefined