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