提交 f19ccd13 编写于 作者: O olegoid 提交者: Christof Marti
上级 c98463a2
......@@ -68,7 +68,7 @@ export interface ITokenResponse {
refresh_token: string;
scope: string;
token_type: string;
id_token: string;
id_token?: string;
}
function parseQuery(uri: vscode.Uri) {
......@@ -454,9 +454,13 @@ export class AzureActiveDirectoryService {
try {
claims = this.getTokenClaims(json.access_token);
} catch {
Logger.info('Failed to fetch token claims from access_token. Attempting to parse id_token instead');
claims = this.getTokenClaims(json.id_token);
} catch (e) {
if (json.id_token) {
Logger.info('Failed to fetch token claims from access_token. Attempting to parse id_token instead');
claims = this.getTokenClaims(json.id_token);
} else {
throw e;
}
}
return {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册