Authentication result

In some circumstances we can need to know authentication result and be able react to that. Last authentication result is saved in HTTP attributes. It can be found under attribute name AAA_AUTH_RESULT. It is neccessary to realize base64 decoding to gain readable JSON value. When authentication was successful, we will see something like:

{
  "status": "OK",
  "data": null,
  "redirect": null
}

Unsuccessful response can be like:

{
  "status": "ERROR",
  "data": {
    "message": "Wrong personal factor.",
    "key": null,
    "arguments": null,
    "statusAIM": "active",
    "statusAuth": "OK",
    "statusLF": "KO"
  },
  "redirect": "https://dev-bank.demo.aducid.com:443/bank-nc/loginPage"
}