gpt4 book ai didi

c# - 如何使用用户凭据从 azure 广告生成不记名 token

转载 作者:行者123 更新时间:2023-12-03 05:38:52 24 4
gpt4 key购买 nike

我有一个.net core API,并且在应用程序中添加了 JWT token 身份验证代码。我的问题是如何从任何应用程序生成不记名 token ,以便我可以验证请求。我无法生成不记名 token 。

我尝试了很多选项,例如来自 Postman GetNewAccessToken 的选项。它要求单点登录,但登录后在新窗口中打开 Microsoft Office 网站。如何从 Postman 获取不记名 token ?

有没有办法使用用户凭据或使用单点登录从 C# 应用程序获取不记名 token ?

enter image description here

enter image description here

我需要一个不记名 token 来验证我的请求。

最佳答案

在浏览器中打开 F12 开发人员工具,查找经过身份验证的请求并查看身份验证 header 。它具有当前版本的不记名 token 。

例如:

  • 转到Graph Explorer preview
  • 登录 Graph Explorer(左上)
  • 打开 F12 开发者工具
  • 运行“我”查询
  • 在“网络”选项卡中查看对 /me 的请求
  • 检查请求 header 并找到授权 header

Authorization header from Graph Explorer - Preview

关于c# - 如何使用用户凭据从 azure 广告生成不记名 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60390643/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com