aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/root-helpers/users
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/root-helpers/users')
-rw-r--r--client/src/root-helpers/users/index.ts2
-rw-r--r--client/src/root-helpers/users/oauth-user-tokens.ts (renamed from client/src/root-helpers/users/user-tokens.ts)8
2 files changed, 5 insertions, 5 deletions
diff --git a/client/src/root-helpers/users/index.ts b/client/src/root-helpers/users/index.ts
index 2b11d0b7e..c03e67325 100644
--- a/client/src/root-helpers/users/index.ts
+++ b/client/src/root-helpers/users/index.ts
@@ -1,2 +1,2 @@
1export * from './user-local-storage-keys' 1export * from './user-local-storage-keys'
2export * from './user-tokens' 2export * from './oauth-user-tokens'
diff --git a/client/src/root-helpers/users/user-tokens.ts b/client/src/root-helpers/users/oauth-user-tokens.ts
index a6d614cb7..a24e76b91 100644
--- a/client/src/root-helpers/users/user-tokens.ts
+++ b/client/src/root-helpers/users/oauth-user-tokens.ts
@@ -1,11 +1,11 @@
1import { UserTokenLocalStorageKeys } from './user-local-storage-keys' 1import { UserTokenLocalStorageKeys } from './user-local-storage-keys'
2 2
3export class UserTokens { 3export class OAuthUserTokens {
4 accessToken: string 4 accessToken: string
5 refreshToken: string 5 refreshToken: string
6 tokenType: string 6 tokenType: string
7 7
8 constructor (hash?: Partial<UserTokens>) { 8 constructor (hash?: Partial<OAuthUserTokens>) {
9 if (hash) { 9 if (hash) {
10 this.accessToken = hash.accessToken 10 this.accessToken = hash.accessToken
11 this.refreshToken = hash.refreshToken 11 this.refreshToken = hash.refreshToken
@@ -25,14 +25,14 @@ export class UserTokens {
25 25
26 if (!accessTokenLocalStorage || !refreshTokenLocalStorage || !tokenTypeLocalStorage) return null 26 if (!accessTokenLocalStorage || !refreshTokenLocalStorage || !tokenTypeLocalStorage) return null
27 27
28 return new UserTokens({ 28 return new OAuthUserTokens({
29 accessToken: accessTokenLocalStorage, 29 accessToken: accessTokenLocalStorage,
30 refreshToken: refreshTokenLocalStorage, 30 refreshToken: refreshTokenLocalStorage,
31 tokenType: tokenTypeLocalStorage 31 tokenType: tokenTypeLocalStorage
32 }) 32 })
33 } 33 }
34 34
35 static saveToLocalStorage (localStorage: Pick<Storage, 'setItem'>, tokens: UserTokens) { 35 static saveToLocalStorage (localStorage: Pick<Storage, 'setItem'>, tokens: OAuthUserTokens) {
36 localStorage.setItem(UserTokenLocalStorageKeys.ACCESS_TOKEN, tokens.accessToken) 36 localStorage.setItem(UserTokenLocalStorageKeys.ACCESS_TOKEN, tokens.accessToken)
37 localStorage.setItem(UserTokenLocalStorageKeys.REFRESH_TOKEN, tokens.refreshToken) 37 localStorage.setItem(UserTokenLocalStorageKeys.REFRESH_TOKEN, tokens.refreshToken)
38 localStorage.setItem(UserTokenLocalStorageKeys.TOKEN_TYPE, tokens.tokenType) 38 localStorage.setItem(UserTokenLocalStorageKeys.TOKEN_TYPE, tokens.tokenType)