[英]How to generate a bearer token from azure ad with user credentials
I have a .net core API and JWT token authentication code is added in the application.我有一个 .net 核心 API,并且在应用程序中添加了 JWT 令牌身份验证代码。 My problem is how can I generate the bearer token from any application so that I can authenticate the request.我的问题是如何从任何应用程序生成不记名令牌,以便我可以对请求进行身份验证。 I am not able to generate the bearer token.我无法生成不记名令牌。
I have tried lots of options like from Postman GetNewAccessToken.我尝试了很多选项,例如 Postman GetNewAccessToken。 Its asks for Single sign-on but after sign-in open the Microsoft office website in a new window.它要求单点登录,但登录后在新窗口中打开 Microsoft Office 网站。 How can I get bearer token from Postman?如何从 Postman 获取不记名令牌?
Is there is any way for getting the bearer token from C# application using users's credentials or using single sign on?有什么方法可以使用用户的凭据或使用单点登录从 C# 应用程序获取不记名令牌?
I need a bearer token just to authenticate my request.我需要一个不记名令牌来验证我的请求。
Open up your F12 developer tools in your browser, look up an authenticated request and have a look at the Authentication header.在浏览器中打开 F12 开发人员工具,查找经过身份验证的请求并查看身份验证标头。 It has a current version of a Bearer token.它具有当前版本的不记名令牌。
For instance:例如:
/me
in the Network tab在“网络”选项卡中查看对/me
的请求
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.