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

Update Utils.php

parent 90ddc759
No related branches found
No related tags found
No related merge requests found
......@@ -121,6 +121,31 @@ class Utils
" \"signature\": \"rsa_sha256_pss:\"\n" . "}";
}
/**
* @return string
*/
public static function postAuthNoRoleAdminResponseBody(): string
{
return "{\n" . " \"id\": 1,\n" . " \"jsonrpc\": \"2.0\",\n" .
" \"result\": {\n" . " \"status\": true,\n" .
" \"value\": {\n" . " \"log_level\": 20,\n" .
" \"menus\": [\n" . " \"components\",\n" .
" \"machines\"\n" . " ],\n" .
" \"realm\": \"\",\n" . " \"rights\": [\n" .
" \"policydelete\",\n" .
" \"resync\"\n" . " ],\n" .
" \"role\": \"user\",\n" . " \"token\": \"" .
self::authToken() . "\",\n" . " \"username\": \"admin\",\n" .
" \"logout_time\": 120,\n" .
" \"default_tokentype\": \"hotp\",\n" .
" \"user_details\": false,\n" .
" \"subscription_status\": 0\n" . " }\n" .
" },\n" . " \"time\": 1589446794.8502703,\n" .
" \"version\": \"privacyIDEA 3.2.1\",\n" .
" \"versionnumber\": \"3.2.1\",\n" .
" \"signature\": \"rsa_sha256_pss:\"\n" . "}";
}
/**
* @return string
*/
......@@ -246,6 +271,17 @@ class Utils
"\"signature\":\"rsa_sha256_pss:1c64db29cad0dc127d6...5ec143ee52a7804ea1dc8e23ab2fc90ac0ac147c0\"}";
}
/**
* @return string
*/
public static function errorMissingAuthorizationHeaderResponseBody(): string
{
return "{" . "\"detail\":null," . "\"id\":1," . "\"jsonrpc\":\"2.0\"," . "\"result\":{" . "\"error\":{" .
"\"code\":4033," . "\"message\":\"Authentication failure. Missing Authorization header.\"}," .
"\"status\":false}," . "\"time\":1649752303.65651," . "\"version\":\"privacyIDEA 3.6.3\"," .
"\"signature\":\"rsa_sha256_pss:1c64db29cad0dc127d6...5ec143ee52a7804ea1dc8e23ab2fc90ac0ac147c0\"}";
}
/**
* @return string
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment