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

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

[Home](./index.md) &gt; [@loopback/authentication](./authentication.md) &gt; [getAuthenticateMetadata](./authentication.getauthenticatemetadata.md)

## getAuthenticateMetadata() function

Fetch authentication metadata stored by `@authenticate` decorator.

<b>Signature:</b>

```typescript
export declare function getAuthenticateMetadata(targetClass: Constructor<{}>, methodName: string): AuthenticationMetadata[] | undefined;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  targetClass | [Constructor](./context.constructor.md)<!-- -->&lt;{}&gt; | Target controller |
|  methodName | string | Target method |

<b>Returns:</b>

[AuthenticationMetadata](./authentication.authenticationmetadata.md)<!-- -->\[\] \| undefined


