@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
63 lines (33 loc) • 1.2 kB
Markdown
---
lang: en
title: 'API docs: authorization.enforcer.enforce'
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.enforcer.enforce.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/authorization](./authorization.md) > [Enforcer](./authorization.enforcer.md) > [enforce](./authorization.enforcer.enforce.md)
## Enforcer.enforce() method
Decide if the request can be granted access
**Signature:**
```typescript
enforce(request: AuthorizationRequest): Promise<AuthorizationDecision>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
request
</td><td markdown="1">
[AuthorizationRequest](./authorization.authorizationrequest.md)
</td><td markdown="1">
</td></tr>
</tbody></table>
**Returns:**
Promise<[AuthorizationDecision](./authorization.authorizationdecision.md)<!-- -->>