Improvement for authentication module

This commit is contained in:
Giuseppe Digilio
2018-02-09 09:55:55 +01:00
parent ae584915cf
commit 2f19f32d91
23 changed files with 431 additions and 124 deletions

View File

@@ -0,0 +1,11 @@
export class AuthTokenInfo {
public accessToken: string;
public expires?: number;
constructor(token: string, expiresIn?: number) {
this.accessToken = token.replace('Bearer ', '');
if (expiresIn) {
this.expires = expiresIn * 1000 + Date.now();
}
}
}