Obtain an authorization decision
Determines whether a specified principal is authorized to perform a specified action in a specified context. The response is either true (the action is authorized) or false (the action is not authorized).
The requested action and contextual details.
An authorization context where the permission field is required
Name | Type | Required | Description |
---|---|---|---|
request | Authorization Context Request | false | A description of the HTTP request that is associated with an authorization request. |
principals | array [Principal] | false | The set of principals representing the actor performing the action. |
permission | string | true | A type of access. Allowed values: addcreatedeletereadremovesecureupdate |
parameters | object | false | A map of keys to objects that represent the parameters and return object of a method being invoked. This can be null or empty. |
matchParams | boolean | false | Whether the authorization service should strictly match query parameters in this context against a rule. Default: false |
eachNamed | object | false | Map of parameter names to a new name that should be used in rule condition evaluation for collections. For example, if a parameter being used for evaluation is a collection named 'items', then eachNamed can map 'items' to 'item' so that item in the collection can be evaluated independently against a rule that references the '#item' variable. |
version | integer<int32> | false | The authorization context's media type version. The version described here is version 1. |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | Always returned if the request is successful and the request's Accept header is application/vnd.sas.authorization.direct.decision+json. However, if the Accept header is application/json or application/vnd.sas.authorization.direct.decision+json, 200 is returned only if the request is successful and the decision is `true`. | Headers | Schema |
201 | Created | Always returned if the request is successful and the request's Accept header is text/plain | Headers | Schema |
400 | Bad Request | The request was invalid. Returned if the authorization context is invalid. | ||
403 | Forbidden | Returned if the request's Accept header is application/vnd.sas.authorization.decision+json or application/json and the request was completed successfully but the authorization decision is `false`. | Schema |