summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/token.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/token.ts b/src/lib/token.ts
index 8508cac..f838ac0 100644
--- a/src/lib/token.ts
+++ b/src/lib/token.ts
@@ -1,4 +1,12 @@
+import { ApiClient } from "../clients/api_client";
+
export default class Token {
+ client: ApiClient;
+
+ constructor() {
+ this.client = new ApiClient();
+ }
+
get() {
return sessionStorage.getItem("token");
}
@@ -23,4 +31,8 @@ export default class Token {
sessionStorage.removeItem("token");
sessionStorage.removeItem("refresh");
}
+
+ refresh() {
+ this.client.post("/refresh_tokens")
+ }
} \ No newline at end of file