]> BookStack Code Mirror - bookstack/blobdiff - tests/TestsApi.php
Added expiry checking to API token auth
[bookstack] / tests / TestsApi.php
index 2bc751f543f537e6d86605d5bf2b29b44bfecb4f..4afcbdf220a5a78c6a2dce92b465554dcceef421 100644 (file)
@@ -13,4 +13,11 @@ trait TestsApi
         return ["error" => ["code" => $code, "message" => $messge]];
     }
 
+    protected function apiAuthHeader()
+    {
+        return [
+            "Authorization" => "Token {$this->apiTokenId}:{$this->apiTokenSecret}"
+        ];
+    }
+
 }
\ No newline at end of file