1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-01-24 08:52:18 +00:00

Mid-apocalypse working release with token cache

This commit is contained in:
snobu
2020-04-06 12:13:48 +03:00
parent 73aeb92e66
commit c48e4c54ca
4 changed files with 34 additions and 68 deletions

View File

@@ -20,7 +20,7 @@ export class TokenCache {
[key: string]: any
}
const decodedJwt: Jwt = jwtDecode(j.accessToken);
const decodedJwt: Jwt = jwtDecode(j.AccessToken);
let now = Math.floor(Date.now() / 1000);
let exp = decodedJwt["exp"];
@@ -31,10 +31,10 @@ export class TokenCache {
}
let session: Session = {
AccessToken: j.accessToken,
ApiGatewayUri: j.apiGatewayUri,
ApiGatewayVersion: j.apiGatewayVersion
}
AccessToken: j.AccessToken,
ApiGatewayUri: j.ApiGatewayUri,
ApiGatewayVersion: j.ApiGatewayVersion
};
return session;
}