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

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

[Home](./index.md) &gt; [@loopback/authorization](./authorization.md) &gt; [getAuthorizationMetadata](./authorization.getauthorizationmetadata.md)

## getAuthorizationMetadata() function

Fetch authorization metadata stored by `@authorize` decorator.

**Signature:**

```typescript
export declare function getAuthorizationMetadata(target: object, methodName: string): AuthorizationMetadata | undefined;
```

## Parameters

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

Parameter


</th><th>

Type


</th><th>

Description


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

target


</td><td>

object


</td><td>

Target object/class


</td></tr>
<tr><td>

methodName


</td><td>

string


</td><td>

Target method


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

**Returns:**

[AuthorizationMetadata](./authorization.authorizationmetadata.md) \| undefined


