Log additional information when getting auth token

This commit is contained in:
Rachel Macfarlane 2020-02-27 10:12:12 -08:00
parent bddc5ef701
commit b77929959c

View file

@ -192,7 +192,9 @@ export class AzureActiveDirectoryService {
private async resolveAccessToken(token: IToken): Promise<string> {
if (token.accessToken && (!token.expiresAt || token.expiresAt > Date.now())) {
Logger.info('Token available from cache');
token.expiresAt
? Logger.info(`Token available from cache, expires in ${token.expiresAt - Date.now()} milliseconds`)
: Logger.info('Token available from cache');
return Promise.resolve(token.accessToken);
}