From 7f53d30c6e934fc95a75b900a46eaa0613ae5b96 Mon Sep 17 00:00:00 2001 From: Latheesan Kanesamoorthy Date: Mon, 9 Dec 2024 02:22:13 +0000 Subject: [PATCH] staging Implement auth/info endpoint --- .../Http/Controllers/API/AuthController.php | 77 +- .../resources/views/scribe/index.blade.php | 686 ++++++++++++++++-- application/routes/api.php | 1 + 3 files changed, 686 insertions(+), 78 deletions(-) diff --git a/application/app/Http/Controllers/API/AuthController.php b/application/app/Http/Controllers/API/AuthController.php index 01e28d2..023fb6e 100644 --- a/application/app/Http/Controllers/API/AuthController.php +++ b/application/app/Http/Controllers/API/AuthController.php @@ -431,7 +431,9 @@ public function check(string $publicApiKey, Request $request): JsonResponse }); - return response()->json($result); + // Return cached response + return response() + ->json($result); } catch (Throwable $exception) { @@ -450,6 +452,79 @@ public function check(string $publicApiKey, Request $request): JsonResponse } } + /** + * Retrieve Account Info + * + * @urlParam publicApiKey string required The project's public api key. Example: 414f7c5c-b932-4d26-9570-1c2f954b64ed + * @queryParam reference string required Unique user/session identifier in your application that was used in the initialization step. Example: abcd1234 + * + * @response status=200 scenario="OK" {"account":{"auth_provider":"google","auth_provider_id":"117571893339073554831","auth_wallet":"eternl","auth_name":"Latheesan","auth_email":"latheesan@example.com","auth_avatar":"https://example.com/profile.jpg", "linked_wallet_stake_address": null, "linked_discord_account": null},"qualifier":null} + * @response status=429 scenario="Too Many Requests" [No Content] + * @responseFile status=400 scenario="Bad Request" resources/api-responses/400.json + * @responseFile status=500 scenario="Internal Server Error" resources/api-responses/500.json + */ + public function info(string $publicApiKey, Request $request): JsonResponse + { + try { + + // Check if reference is provided in the request + if (empty($request->get('reference')) || strlen($request->get('reference')) > 512) { + return response()->json([ + 'error' => __('Bad Request'), + 'reason' => __('The reference query string parameter is empty or larger than 512 characters.'), + ], 400); + } + + // Check and cache the result for 10 minutes + $result = Cache::remember(sprintf('auth-info:%s', md5($publicApiKey . $request->get('reference'))), 600, function () use ($publicApiKey, $request) { + + // Load session and account info + $projectAccountSession = ProjectAccountSession::query() + ->where('reference', $request->get('reference')) + ->with(['account', 'stats']) + ->whereHas('project', static function ($query) use ($publicApiKey) { + $query->where('public_api_key', $publicApiKey); + }) + ->first(); + + // Build result + return [ + 'account' => $projectAccountSession ? [ + 'auth_provider' => $projectAccountSession->account->auth_provider, + 'auth_provider_id' => $projectAccountSession->account->auth_provider_id, + 'auth_wallet' => $projectAccountSession->account->auth_wallet, + 'auth_name' => $projectAccountSession->account->auth_name, + 'auth_email' => $projectAccountSession->account->auth_email, + 'auth_avatar' => $projectAccountSession->account->auth_avatar, + 'linked_wallet_stake_address' => $projectAccountSession->account->linked_wallet_stake_address, + 'linked_discord_account' => $projectAccountSession->account->linked_discord_account, + ] : null, + 'qualifier' => $projectAccountSession && isset($projectAccountSession->stats['qualifier']) ? $projectAccountSession->stats['qualifier'] : null, + ]; + + }); + + // Return cached response + return response() + ->json($result); + + } catch (Throwable $exception) { + + // Log exception + $this->logException('Failed to handle auth info', $exception, [ + 'publicApiKey' => $publicApiKey, + 'reference' => $request->get('reference'), + ]); + + // Handle error + return response()->json([ + 'error' => __('Internal Server Error'), + 'reason' => __('An unknown error occurred, please notify server administrator'), + ], 500); + + } + } + /** * Refresh Authentication Session * diff --git a/application/resources/views/scribe/index.blade.php b/application/resources/views/scribe/index.blade.php index 478c094..ef0f337 100644 --- a/application/resources/views/scribe/index.blade.php +++ b/application/resources/views/scribe/index.blade.php @@ -377,6 +377,18 @@ class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted" + @@ -1808,8 +1820,8 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img" id="json-body-POSTapi-v1-auth-initWallet--publicApiKey-" style="font-family: var(--font-code); font-size: 12px; line-height: var(--lh-code);" >{ - "reference": "sh", - "stakeKeyAddress": "ujdobeopgwba" + "reference": "ycubtvqhssfqbrmarhscvvxx", + "stakeKeyAddress": "xwetnqviyshfjys" } @@ -1903,12 +1915,12 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
curl --request POST \
-    "http://localhost:8200/api/v1/auth/initWallet/ex" \
+    "http://localhost:8200/api/v1/auth/initWallet/consequatur" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data "{
-    \"reference\": \"sh\",
-    \"stakeKeyAddress\": \"ujdobeopgwba\"
+    \"reference\": \"ycubtvqhssfqbrmarhscvvxx\",
+    \"stakeKeyAddress\": \"xwetnqviyshfjys\"
 }"
 
@@ -1918,7 +1930,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
const url = new URL(
-    "http://localhost:8200/api/v1/auth/initWallet/ex"
+    "http://localhost:8200/api/v1/auth/initWallet/consequatur"
 );
 
 const headers = {
@@ -1927,8 +1939,8 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
 };
 
 let body = {
-    "reference": "sh",
-    "stakeKeyAddress": "ujdobeopgwba"
+    "reference": "ycubtvqhssfqbrmarhscvvxx",
+    "stakeKeyAddress": "xwetnqviyshfjys"
 };
 
 fetch(url, {
@@ -1943,7 +1955,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                     
$client = new \GuzzleHttp\Client();
-$url = 'http://localhost:8200/api/v1/auth/initWallet/ex';
+$url = 'http://localhost:8200/api/v1/auth/initWallet/consequatur';
 $response = $client->post(
     $url,
     [
@@ -1952,8 +1964,8 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
             'Accept' => 'application/json',
         ],
         'json' => [
-            'reference' => 'sh',
-            'stakeKeyAddress' => 'ujdobeopgwba',
+            'reference' => 'ycubtvqhssfqbrmarhscvvxx',
+            'stakeKeyAddress' => 'xwetnqviyshfjys',
         ],
     ]
 );
@@ -1968,10 +1980,10 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                             
import requests
 import json
 
-url = 'http://localhost:8200/api/v1/auth/initWallet/ex'
+url = 'http://localhost:8200/api/v1/auth/initWallet/consequatur'
 payload = {
-    "reference": "sh",
-    "stakeKeyAddress": "ujdobeopgwba"
+    "reference": "ycubtvqhssfqbrmarhscvvxx",
+    "stakeKeyAddress": "xwetnqviyshfjys"
 }
 headers = {
   'Content-Type': 'application/json',
@@ -2086,7 +2098,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://localhost:8200Example: 
                 
- repudiandae + sit
@@ -2120,7 +2132,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://localhost:8200Example:
- njdmxbpzypuiil + kglvffgqhdqahyg
@@ -2147,7 +2159,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://localhost:8200Example:
- zbmxhkciuswypjjmbuucpq + bucmqxkm
@@ -2174,7 +2186,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://localhost:8200Example:
- ftqxmdzowizumbqrhyunhelxk + nbmbnlxad
@@ -2198,7 +2210,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://localhost:8200Example:
- false + true
@@ -2224,7 +2236,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://localhost:8200Example:
- 1 + 0
@@ -2320,7 +2332,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img" @@ -2351,11 +2363,11 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img" id="json-body-POSTapi-v1-auth-verifyWallet--publicApiKey-" style="font-family: var(--font-code); font-size: 12px; line-height: var(--lh-code);" >{ - "walletName": "njdmxbpzypuiil", - "reference": "zbmxhkciuswypjjmbuucpq", - "stakeKeyAddress": "ftqxmdzowizumbqrhyunhelxk", - "isHardwareWallet": false, - "networkMode": "1" + "walletName": "kglvffgqhdqahyg", + "reference": "bucmqxkm", + "stakeKeyAddress": "nbmbnlxad", + "isHardwareWallet": true, + "networkMode": "0" } @@ -2449,15 +2461,15 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
curl --request POST \
-    "http://localhost:8200/api/v1/auth/verifyWallet/repudiandae" \
+    "http://localhost:8200/api/v1/auth/verifyWallet/sit" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data "{
-    \"walletName\": \"njdmxbpzypuiil\",
-    \"reference\": \"zbmxhkciuswypjjmbuucpq\",
-    \"stakeKeyAddress\": \"ftqxmdzowizumbqrhyunhelxk\",
-    \"isHardwareWallet\": false,
-    \"networkMode\": \"1\"
+    \"walletName\": \"kglvffgqhdqahyg\",
+    \"reference\": \"bucmqxkm\",
+    \"stakeKeyAddress\": \"nbmbnlxad\",
+    \"isHardwareWallet\": true,
+    \"networkMode\": \"0\"
 }"
 
@@ -2467,7 +2479,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
const url = new URL(
-    "http://localhost:8200/api/v1/auth/verifyWallet/repudiandae"
+    "http://localhost:8200/api/v1/auth/verifyWallet/sit"
 );
 
 const headers = {
@@ -2476,11 +2488,11 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
 };
 
 let body = {
-    "walletName": "njdmxbpzypuiil",
-    "reference": "zbmxhkciuswypjjmbuucpq",
-    "stakeKeyAddress": "ftqxmdzowizumbqrhyunhelxk",
-    "isHardwareWallet": false,
-    "networkMode": "1"
+    "walletName": "kglvffgqhdqahyg",
+    "reference": "bucmqxkm",
+    "stakeKeyAddress": "nbmbnlxad",
+    "isHardwareWallet": true,
+    "networkMode": "0"
 };
 
 fetch(url, {
@@ -2495,7 +2507,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                     
$client = new \GuzzleHttp\Client();
-$url = 'http://localhost:8200/api/v1/auth/verifyWallet/repudiandae';
+$url = 'http://localhost:8200/api/v1/auth/verifyWallet/sit';
 $response = $client->post(
     $url,
     [
@@ -2504,11 +2516,11 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
             'Accept' => 'application/json',
         ],
         'json' => [
-            'walletName' => 'njdmxbpzypuiil',
-            'reference' => 'zbmxhkciuswypjjmbuucpq',
-            'stakeKeyAddress' => 'ftqxmdzowizumbqrhyunhelxk',
-            'isHardwareWallet' => false,
-            'networkMode' => '1',
+            'walletName' => 'kglvffgqhdqahyg',
+            'reference' => 'bucmqxkm',
+            'stakeKeyAddress' => 'nbmbnlxad',
+            'isHardwareWallet' => true,
+            'networkMode' => '0',
         ],
     ]
 );
@@ -2523,13 +2535,13 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                             
import requests
 import json
 
-url = 'http://localhost:8200/api/v1/auth/verifyWallet/repudiandae'
+url = 'http://localhost:8200/api/v1/auth/verifyWallet/sit'
 payload = {
-    "walletName": "njdmxbpzypuiil",
-    "reference": "zbmxhkciuswypjjmbuucpq",
-    "stakeKeyAddress": "ftqxmdzowizumbqrhyunhelxk",
-    "isHardwareWallet": false,
-    "networkMode": "1"
+    "walletName": "kglvffgqhdqahyg",
+    "reference": "bucmqxkm",
+    "stakeKeyAddress": "nbmbnlxad",
+    "isHardwareWallet": true,
+    "networkMode": "0"
 }
 headers = {
   'Content-Type': 'application/json',
@@ -3088,6 +3100,526 @@ class="language-json sl-overflow-x-auto sl-overflow-y-auto">{
 
                     
+
+
+

+ Retrieve Account Info +

+
+
+ +
+
+
+ GET +
+
+
http://localhost:8200
+
/api/v1/auth/info/{publicApiKey}
+
+ +
+
+ + +
+
+
+
+
+
+

+ Headers +

+
+
+
+
+
+
+
Content-Type
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+
+
+
+
Accept
+
+
+
+ Example: +
+
+ application/json +
+
+
+
+
+
+
+ +
+

URL Parameters

+ +
+
+
+
+
+
+
publicApiKey
+ string +
+
+ required +
+
+

The project's public api key.

+
+
+ Example: +
+
+ 414f7c5c-b932-4d26-9570-1c2f954b64ed +
+
+
+
+
+
+
+ + +
+

Query Parameters

+ +
+
+
+
+
+
+
reference
+ string +
+
+ required +
+
+

Unique user/session identifier in your application that was used in the initialization step.

+
+
+ Example: +
+
+ abcd1234 +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+
+ + + + + + + + +
+
+ +
+
+ + + + +
+
+
+ +
+
+
+
+ Example request: + +
+
+
+
+
+
+
curl --request GET \
+    --get "http://localhost:8200/api/v1/auth/info/414f7c5c-b932-4d26-9570-1c2f954b64ed?reference=abcd1234" \
+    --header "Content-Type: application/json" \
+    --header "Accept: application/json"
+
+
+ + + +
+ +
+
+
+
+
+
Example response:
+
+
+
+
+
+ +
+
+
+
{
+    "account": {
+        "auth_provider": "google",
+        "auth_provider_id": "117571893339073554831",
+        "auth_wallet": "eternl",
+        "auth_name": "Latheesan",
+        "auth_email": "latheesan@example.com",
+        "auth_avatar": "https://example.com/profile.jpg",
+        "linked_wallet_stake_address": null,
+        "linked_discord_account": null
+    },
+    "qualifier": null
+}
+
+
+
+
+
{
+    "error": "Bad Request",
+    "reason": "Reason for this error"
+}
+
+
+
+
+
[No Content]
+
+
+
+
+
{
+    "error": "Internal Server Error",
+    "reason": "Reason for this error"
+}
+
+
+
+
+
+
+ +
+

http://localhost:8200Example:
- voluptatem + sed

@@ -4448,7 +4980,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
@@ -4546,7 +5078,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
curl --request GET \
-    --get "http://localhost:8200/api/v1/stats/global/voluptatem" \
+    --get "http://localhost:8200/api/v1/stats/global/sed" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -4556,7 +5088,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
const url = new URL(
-    "http://localhost:8200/api/v1/stats/global/voluptatem"
+    "http://localhost:8200/api/v1/stats/global/sed"
 );
 
 const headers = {
@@ -4575,7 +5107,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                     
$client = new \GuzzleHttp\Client();
-$url = 'http://localhost:8200/api/v1/stats/global/voluptatem';
+$url = 'http://localhost:8200/api/v1/stats/global/sed';
 $response = $client->get(
     $url,
     [
@@ -4596,7 +5128,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                             
import requests
 import json
 
-url = 'http://localhost:8200/api/v1/stats/global/voluptatem'
+url = 'http://localhost:8200/api/v1/stats/global/sed'
 headers = {
   'Content-Type': 'application/json',
   'Accept': 'application/json'
@@ -4795,7 +5327,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://localhost:8200Example: 
                 
- rem + consequatur
@@ -4816,7 +5348,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://localhost:8200Example:
- magnam + quo
@@ -4913,7 +5445,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
@@ -4925,7 +5457,7 @@ class="sl-relative sl-w-full sl-h-md sl-text-base sl-pr-2.5 sl-pl-2.5 sl-rounded
@@ -5023,7 +5555,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
curl --request GET \
-    --get "http://localhost:8200/api/v1/stats/session/rem/magnam" \
+    --get "http://localhost:8200/api/v1/stats/session/consequatur/quo" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -5033,7 +5565,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
const url = new URL(
-    "http://localhost:8200/api/v1/stats/session/rem/magnam"
+    "http://localhost:8200/api/v1/stats/session/consequatur/quo"
 );
 
 const headers = {
@@ -5052,7 +5584,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                     
$client = new \GuzzleHttp\Client();
-$url = 'http://localhost:8200/api/v1/stats/session/rem/magnam';
+$url = 'http://localhost:8200/api/v1/stats/session/consequatur/quo';
 $response = $client->get(
     $url,
     [
@@ -5073,7 +5605,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                             
import requests
 import json
 
-url = 'http://localhost:8200/api/v1/stats/session/rem/magnam'
+url = 'http://localhost:8200/api/v1/stats/session/consequatur/quo'
 headers = {
   'Content-Type': 'application/json',
   'Accept': 'application/json'
@@ -6208,7 +6740,7 @@ class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"
                                                                                                                     access-control-allow-origin
                                                             : *
                                                                                                                     set-cookie
-                                                            : XSRF-TOKEN=eyJpdiI6ImlKZHNXcEFwMkFRNytwM2hZa0Z5OFE9PSIsInZhbHVlIjoiRlA4dk1YTjlJdHNWQnFJeW9PMW5zOVlKM0FLODJ4T2lBZCtMU3JqdmFncytXdGhDbU0xNGgrM2lXbm5GNnFMbkhRTmJjeU1Xd1hRT1owN0NRdjUzTWE0dGZZbTBVdmFkSXR2MWpsN0xZQ1Qyenl3STM0eThHREE5c3pQZUFPYzMiLCJtYWMiOiIxOGI4OWY1ODkxNTAzZTc3YzljOWNkMmZhMzVkZmVlMTU3MmRmNTFlOWJiNmU4OTg4OWMxNTgxYzNjMGRmMDFiIiwidGFnIjoiIn0%3D; expires=Sun, 08 Dec 2024 05:37:43 GMT; Max-Age=7200; path=/; samesite=lax; rewardengine_session=eyJpdiI6IlhLYXJzQlphSVJ1NEI3dWEvMVRPQ2c9PSIsInZhbHVlIjoiTTlpY28wQkdZTEFsZytTajg0Qm5mbGRtOHBtbklhR1FXSU5KL3hmeGxZaFRMYW5VcGRoUFZQNzJVRzE4S0VKZTVKVENUU1luY3NIenV6Y2p2SlZZV2xxK0VVSXhQUG5nNkVGV0NoZitzMmdFaEtKRkd6WTFWV0gxdjZuUURDK3AiLCJtYWMiOiJmYjFjN2Y4YzFhM2E1YjYwNzNmNDFhZGFlNmMxMjM2YjM1MmVhNzJjYzEwZGVmN2RhYzEzNWU3ZmI1YmQ2YmQ0IiwidGFnIjoiIn0%3D; expires=Sun, 08 Dec 2024 05:37:43 GMT; Max-Age=7200; path=/; httponly; samesite=lax
+                                                            : XSRF-TOKEN=eyJpdiI6IkkzUW9waG5LVG5telpXazRHeUFWNlE9PSIsInZhbHVlIjoiZERvYTZtSUlpVW9tZ2JwK25WRVlQd0hLOFptd0w2QXJLMkVCalpybU94S2xJNncyQ2JvVlZjcTMxK1FIMitLckZsQXhqemxSMFZjY0R1RjlMNkFUTmxyNG5CWUhUVW82SnlrUmU1ckNXejFRd013MFRSa3RGcTRpVWk1VGNvMDYiLCJtYWMiOiJiOGI5NzRjMTQ4ODk2ZDEzNGZhN2ExYWM4MTkyODFjMTRjNjMyM2U5YTQzNDU1ZWM4NDBmOTE0Yjc4YjMwYzdjIiwidGFnIjoiIn0%3D; expires=Mon, 09 Dec 2024 04:21:21 GMT; Max-Age=7200; path=/; samesite=lax; rewardengine_session=eyJpdiI6InowRXozZWUyVjhNcDhUR0V3dXVZMHc9PSIsInZhbHVlIjoiaDF6SitFOVBqL2ZmVGQyYk4xTDY5MUFJVmtCNFdKZmZpSEZmZ1JSeXNhaTd4SWlIU0c5S2tUcXFjeHZ4ZDZwVXRRRnhlOWVqV2ZBbC9RU083eXFrM0Rxd3NJd041T1pUREppa1Rma3hXREJKVWNuaWpVa2c3VjNWcHNTeGhsbzgiLCJtYWMiOiI1YjI4Yjc2N2NjNWRjMmE1OGQwYjBhMmYwZjM0MzkyYjZmYzcwYmM2NjgyNjQ1YjkyNTdlYjYxNGZhODBlMTM0IiwidGFnIjoiIn0%3D; expires=Mon, 09 Dec 2024 04:21:21 GMT; Max-Age=7200; path=/; httponly; samesite=lax
                                                          
@@ -6785,7 +7317,7 @@ class="sl-overflow-x-hidden sl-truncate sl-text-muted">http://localhost:8200Example:
- debitis + voluptatem
@@ -6882,7 +7414,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
@@ -6980,7 +7512,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
curl --request GET \
-    --get "http://localhost:8200/api/v1/stats/leaderboard/debitis/qualifiers" \
+    --get "http://localhost:8200/api/v1/stats/leaderboard/voluptatem/qualifiers" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -6990,7 +7522,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
const url = new URL(
-    "http://localhost:8200/api/v1/stats/leaderboard/debitis/qualifiers"
+    "http://localhost:8200/api/v1/stats/leaderboard/voluptatem/qualifiers"
 );
 
 const headers = {
@@ -7009,7 +7541,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                     
$client = new \GuzzleHttp\Client();
-$url = 'http://localhost:8200/api/v1/stats/leaderboard/debitis/qualifiers';
+$url = 'http://localhost:8200/api/v1/stats/leaderboard/voluptatem/qualifiers';
 $response = $client->get(
     $url,
     [
@@ -7030,7 +7562,7 @@ class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
                                             
import requests
 import json
 
-url = 'http://localhost:8200/api/v1/stats/leaderboard/debitis/qualifiers'
+url = 'http://localhost:8200/api/v1/stats/leaderboard/voluptatem/qualifiers'
 headers = {
   'Content-Type': 'application/json',
   'Accept': 'application/json'
diff --git a/application/routes/api.php b/application/routes/api.php
index e284910..916eca5 100644
--- a/application/routes/api.php
+++ b/application/routes/api.php
@@ -23,6 +23,7 @@
         Route::post('initWallet/{publicApiKey}', [AuthController::class, 'initWallet'])->name('initWallet');
         Route::post('verifyWallet/{publicApiKey}', [AuthController::class, 'verifyWallet'])->name('verifyWallet');
         Route::get('check/{publicApiKey}', [AuthController::class, 'check'])->name('check');
+        Route::get('info/{publicApiKey}', [AuthController::class, 'info'])->name('info');
         Route::post('refresh/{publicApiKey}', [AuthController::class, 'refresh'])->name('refresh');
 
     });