authzen icon indicating copy to clipboard operation
authzen copied to clipboard

`id` in reasons object seems under defined

Open jogu opened this issue 1 year ago • 1 comments

id in the reasons object is currently defined as:

REQUIRED. A string value that specifies the reason within the scope of a particular response.

I don't understand what this means.

It looks like you can only have a single reason object in each response, so I'm not sure I'm following the need to have an identifier scoped to one particular response, and I'm not sure who would ever use the reason object id nor what for.

jogu avatar Sep 19 '24 07:09 jogu

id would have a sense if it relates to a specific evaluation but as JSON array preserves the order of the item, does it help to have a required id here?

Maybe it could reformatted along issues/152 as:

{
  "decision": true,
  "context": {
    "reasons": [
      "0": {
        "reason_admin": {
          "en": "Request failed policy C076E82F"
        },
        "reason_user": {
          "en-403": "Insufficient privileges. Contact your administrator",
          "es-403": "Privilegios insuficientes. Póngase en contacto con su administrador"
        }
      }
    ]
  }
}

identitymonk avatar Mar 10 '25 21:03 identitymonk

Let's link this to #278 and #264

davidjbrossard avatar Jun 20 '25 21:06 davidjbrossard