mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53:03 +00:00
Improvement for authentication module
This commit is contained in:
11
src/app/core/auth/models/auth-token-info.model.ts
Normal file
11
src/app/core/auth/models/auth-token-info.model.ts
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user