1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Login in Angular : first draft

This commit is contained in:
Chocobozzz 2016-03-22 15:51:54 +01:00
parent 13ce1d01c9
commit b1794c53ac
8 changed files with 163 additions and 3 deletions

View file

@ -0,0 +1,17 @@
export class Token {
access_token: string;
refresh_token: string;
token_type: string;
constructor (hash) {
this.access_token = hash.access_token;
this.refresh_token = hash.refresh_token;
this.token_type = hash.token_type;
}
save() {
localStorage.setItem('access_token', this.access_token);
localStorage.setItem('refresh_token', this.refresh_token);
localStorage.setItem('token_type', this.token_type);
}
}