Obtain AzureAppProxyAccessCookie when I have a valid Azure AD JWT token

▼魔方 西西 提交于 2021-02-08 08:05:57

问题


Some background info:

I'm working on a two-factor authentication solution for some API by using

  1. Azure AD
  2. encoded api key

I'm able to get a valid access token pogrammatically to be used as authorization bearer token on the header request. Unfortunately, the API expects the 2) encoded api key to be delivered through the authorizaton field, and as such, I'm expected to use the pass AAD auth through a cookie instead.

If I direct chrome to my api and log in normally while capturing the traffic, I see that the cookie AzureAppProxyAccessCookie is set.

If i do a curl GET request with this cookie against my api, the response is successful.

TLDR/Actual question: How can I obtain a valid AzureAppProxyAccessCookie programmatically when I already am able to obtain a valid JWT token?

来源:https://stackoverflow.com/questions/50760446/obtain-azureappproxyaccesscookie-when-i-have-a-valid-azure-ad-jwt-token

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!