Page Contents
Home > @loopback/authorization > AuthorizationOptions
AuthorizationOptions interface
Signature:
export interface AuthorizationOptions
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| [defaultDecision?](/doc/en/lb4/apidocs.authorization.authorizationoptions.defaultdecision.html) | [AuthorizationDecision.DENY](/doc/en/lb4/apidocs.authorization.authorizationdecision.html) \| [AuthorizationDecision.ALLOW](/doc/en/lb4/apidocs.authorization.authorizationdecision.html) | _(Optional)_ Default decision if all authorizers vote for ABSTAIN If not set, default to `AuthorizationDecision.DENY` | |
| [defaultMetadata?](/doc/en/lb4/apidocs.authorization.authorizationoptions.defaultmetadata.html) | [AuthorizationMetadata](/doc/en/lb4/apidocs.authorization.authorizationmetadata.html) | _(Optional)_ Default authorization metadata if a method is not decorated with `@authorize`. If not set, no authorization will be enforced for those methods that are not associated with authorization metadata. | |
| [defaultStatusCodeForDeny?](/doc/en/lb4/apidocs.authorization.authorizationoptions.defaultstatuscodefordeny.html) | number | _(Optional)_ Default HTTP status code when the final decision is `AuthorizationDecision.DENY`. If not set, default to 403 | |
| [precedence?](/doc/en/lb4/apidocs.authorization.authorizationoptions.precedence.html) | [AuthorizationDecision.DENY](/doc/en/lb4/apidocs.authorization.authorizationdecision.html) \| [AuthorizationDecision.ALLOW](/doc/en/lb4/apidocs.authorization.authorizationdecision.html) | _(Optional)_ Controls if Allow/Deny vote takes precedence and override other votes. If not set, default to `AuthorizationDecision.DENY`. Once a vote matches the `precedence`, it becomes the final decision. The rest of votes will be skipped. |