我想獲得帶有證書的訪問令牌。
我從我的應用程式中知道這些 client_id、grant_type、范圍的值。
但是我在哪里可以找到 assertion 和 client_assertion 的值。
我需要獲得更多的代幣嗎,我完全迷路了。
任何人都可以用作業示例指導我嗎?
uj5u.com熱心網友回復:
這是一個樣本。可以概括為:
- 去這個網址獲取授權碼:
https://login.microsoftonline.com/tenant_id/oauth2/v2.0/authorize? client_id=aad_client_id &response_type=code &redirect_uri=http://localhost/myapp/ &response_mode=query &scope=api://aad_client_id_which_exposed_api/permission_name &state=12345
2.使用授權碼通過授權碼流生成訪問令牌。3. 使用access token 通過obo flow 生成另一個access token。

當一個 API 想要呼叫另一個 API 時,使用代表流。所以首先你需要有一個受AAD保護的web api,這樣它才能接收到一個訪問令牌A。有了這個令牌A后,代表流可以由A生成一個新的令牌B,所以A是引數assertion。然后使用client id client secret并按照
你也可以參考這個教程,這可以幫助你理解obo流程。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/527340.html
上一篇:將資料從一個表拆分到另一個表
