Skip to content
Snippets Groups Projects
Commit 1489ebed authored by lukasmatusiewicz's avatar lukasmatusiewicz
Browse files

update authenticationstatus controll

parent 1f57657d
Branches
No related tags found
No related merge requests found
......@@ -4,4 +4,5 @@ abstract class AuthenticationStatus
const CHALLENGE = "CHALLENGE";
const ACCEPT = "ACCEPT";
const REJECT = "REJECT";
const NONE = "NONE";
}
\ No newline at end of file
......@@ -86,6 +86,7 @@ class PIResponse
$ret->transactionID = $map['detail']['transaction_id'];
}
// Prove that the autheitication status is one of the allowed ones
$r = $map['result']['authentication'] ?: null;
if ($r === AuthenticationStatus::CHALLENGE)
{
......@@ -99,6 +100,11 @@ class PIResponse
{
$ret->authenticationStatus = AuthenticationStatus::REJECT;
}
else
{
$privacyIDEA->debugLog("Unknown authentication status");
$ret->authenticationStatus = AuthenticationStatus::NONE;
}
$ret->status = $map['result']['status'] ?: false;
$ret->value = $map['result']['value'] ?: false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment