@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
145 lines (67 loc) • 2.35 kB
Markdown
---
lang: en
title: 'API docs: authorization.authorizationcontext'
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.authorizationcontext.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/authorization](./authorization.md) > [AuthorizationContext](./authorization.authorizationcontext.md)
## AuthorizationContext interface
Request context for authorization
**Signature:**
```typescript
export interface AuthorizationContext
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
[invocationContext](./authorization.authorizationcontext.invocationcontext.md)
</td><td markdown="1">
</td><td markdown="1">
[InvocationContext](./context.invocationcontext.md)
</td><td markdown="1">
Context for the invocation
</td></tr>
<tr><td markdown="1">
[principals](./authorization.authorizationcontext.principals.md)
</td><td markdown="1">
</td><td markdown="1">
[Principal](./security.principal.md)<!-- -->\[\]
</td><td markdown="1">
An array of principals identified for the request - it should come from authentication
</td></tr>
<tr><td markdown="1">
[resource](./authorization.authorizationcontext.resource.md)
</td><td markdown="1">
</td><td markdown="1">
string
</td><td markdown="1">
An name for the target resource to be accessed, such as `OrderController.prototype.cancelOrder`
</td></tr>
<tr><td markdown="1">
[roles](./authorization.authorizationcontext.roles.md)
</td><td markdown="1">
</td><td markdown="1">
[Role](./security.role.md)<!-- -->\[\]
</td><td markdown="1">
An array of roles for principals
</td></tr>
<tr><td markdown="1">
[scopes](./authorization.authorizationcontext.scopes.md)
</td><td markdown="1">
</td><td markdown="1">
string\[\]
</td><td markdown="1">
An array of scopes representing granted permissions - usually come from access tokens
</td></tr>
</tbody></table>