Check

Using the check command, it is possible to check authz requests.

This command checks an authorization request.

Examples:
  # check an authorization request
  permguard authz check --zone-id 273165098782 /path/to/authorization_request.json


  Find more information at: https://www.permguard.com/docs/0.0.x/command-line/how-to-use/

Usage:
  permguard authz check [flags]

Flags:
      --zone-id int    zone id
  -h, --help          help for check

Global Flags:
  -o, --output string    output format (default "terminal")
  -v, --verbose          true for verbose output
  -w, --workdir string   workdir (default ".")

The output from your current version of Permguard may differ from the example provided on this page.

Check an Authorization Request

The permguard authz check command allows to check an authorization request.

permguard authz check --zone-id 273165098782 /path/to/authorization_request.json

Below are other methods to pass the input:

permguard authz check --zone-id 273165098782 < /path/to/authorization_request.json
cat /path/to/authorization_request.json | permguard authz check --zone-id 273165098782

output:

Authorization check response: true
JSON Output
permguard authz check --zone-id 273165098782 /path/to/authorization_request.json -o json

output:

{
  "authorization_check": {
    "decision": true,
    "context": {},
    "evaluations": [
      {
        "decision": true,
        "context": {}
      }
    ]
  }
}