]>
Commit | Line | Data |
---|---|---|
b1794c53 C |
1 | export class Token { |
2 | access_token: string; | |
3 | refresh_token: string; | |
4 | token_type: string; | |
5 | ||
6 | constructor (hash) { | |
7 | this.access_token = hash.access_token; | |
8 | this.refresh_token = hash.refresh_token; | |
9 | this.token_type = hash.token_type; | |
10 | } | |
11 | ||
12 | save() { | |
13 | localStorage.setItem('access_token', this.access_token); | |
14 | localStorage.setItem('refresh_token', this.refresh_token); | |
15 | localStorage.setItem('token_type', this.token_type); | |
16 | } | |
17 | } |