Skip to content
Snippets Groups Projects
Unverified Commit 8c99ad04 authored by lukasmatusiewicz's avatar lukasmatusiewicz Committed by GitHub
Browse files

Add realm to enroll token function (#36)

parent 19c9a6c4
No related branches found
No related tags found
No related merge requests found
......@@ -187,6 +187,11 @@ class PrivacyIDEA
return null;
}
if (!empty($this->realm))
{
$params["realm"] = $this->realm;
}
$params["user"] = $username;
$params["genkey"] = $genkey;
$params["type"] = $type;
......@@ -198,7 +203,7 @@ class PrivacyIDEA
$header = array("authorization:" . $authToken);
// Check if user has token
$tokenInfo = json_decode($this->sendRequest(array("user" => $username), $header, 'GET', '/token'));
$tokenInfo = json_decode($this->sendRequest(array("user" => $username, "realm" => $params["realm"]), $header, 'GET', '/token'));
if (!empty($tokenInfo->result->value->tokens))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment