Azure AD Msal侦听器访问令牌


我使用azure MSAL来验证我的应用程序接口,但问题是我使用DevExtreme自定义存储进行服务器端分页。

Msal拦截器可以工作,并且为HttpClient自动生成令牌,但在这种情况下,我不会通过http发送请求。

如果我使用登录后获得的访问令牌,则出现错误,签名无效,如果使用IdToken,则如何解决此问题。

MSALInterceptorConfigFactory:

protectedResourceMap.set('https://localhost:44379/api/approveMilestones', ['api://cb343c76-cd5b-4af6-8229-014b2522adab/access_as_user']);

获取accessToken和IdToken的登录响应

this.authService.loginPopup()
  .subscribe((response: AuthenticationResult) => {
    AuthenticationHelper.setToken(response.accessToken);
    this.router.navigate(['/payments-approval']);
  });

I'm getting accessToken and IdTOken both in result but these are not working if i send them with request for Bearer

转载请注明出处:http://www.souyuntu.com/article/20230526/1570485.html