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

Add realm to enroll token function

parent 19c9a6c4
No related branches found
No related tags found
No related merge requests found
...@@ -187,6 +187,11 @@ class PrivacyIDEA ...@@ -187,6 +187,11 @@ class PrivacyIDEA
return null; return null;
} }
if (!empty($this->realm))
{
$params["realm"] = $this->realm;
}
$params["user"] = $username; $params["user"] = $username;
$params["genkey"] = $genkey; $params["genkey"] = $genkey;
$params["type"] = $type; $params["type"] = $type;
...@@ -198,7 +203,7 @@ class PrivacyIDEA ...@@ -198,7 +203,7 @@ class PrivacyIDEA
$header = array("authorization:" . $authToken); $header = array("authorization:" . $authToken);
// Check if user has token // 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)) 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