@loopback/docs
Version:
Documentation for LoopBack 4
35 lines (22 loc) • 915 B
Markdown
lang: en
title: 'API docs: authorization.enforcer.enforce'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/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
<b>Signature:</b>
```typescript
enforce(request: AuthorizationRequest): Promise<AuthorizationDecision>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| request | <code>AuthorizationRequest</code> | |
<b>Returns:</b>
`Promise<AuthorizationDecision>`