VS Code exposes the access token for an AuthenticationSession but not its expiration time. There are some client SDKs (notably one of Azure's SDKs) that expect a credentials object that exposes both the token and its expiration. (It happens, in the case of Azure, that faking an expiration time works, but that's an implementation detail that could easily break version to version.)
I propose adding an expiresAt property to AuthenticationSession:
declare namespace 'vscode' {
export interface AuthenticationSession {
/**
* The date/time at which the access token will expire, expressed by the number of milliseconds elapsed since 1/1/1970 00:00:00 UTC.
*/
readonly expiresAt: number;
}
}
VS Code exposes the access token for an
AuthenticationSession
but not its expiration time. There are some client SDKs (notably one of Azure's SDKs) that expect a credentials object that exposes both the token and its expiration. (It happens, in the case of Azure, that faking an expiration time works, but that's an implementation detail that could easily break version to version.)I propose adding an
expiresAt
property toAuthenticationSession
: