【问题标题】:Retrieve access_token from cookie for Azure AD Passport BearerStrategy从 Azure AD Passport BearerStrategy 的 cookie 中检索 access_token
【发布时间】:2019-05-30 10:44:43
【问题描述】:

我有一个使用 OIDCStrategy 对用户进行身份验证的 webapp。它使用 cookie 而不是带有 useCookieInsteadOfSession 标志的会话。我的另一个应用程序是受 BearerStrategy 保护的 API。我的 webapp,使用 axios withCredentials: true 我通过浏览器 cookie 发送。但是在 API 中,BearerStrategy 只检查请求标头的授权。有没有办法提取cookie中的access_token?

【问题讨论】:

    标签: adal


    【解决方案1】:

    据我了解(技术和您的问题),您需要使用 Auth 库,例如 Passport-Azure-Ad for javascript。

    【讨论】:

      猜你喜欢
      • 2021-06-01
      • 2015-06-07
      • 2019-12-29
      • 1970-01-01
      • 2019-06-18
      • 2018-03-09
      • 2017-02-01
      • 2017-11-11
      • 2021-08-17
      相关资源
      最近更新 更多