两个具有不同access_token格式的相同的Azure应用程序 - 一个JWT,另一个非JWT
访问/.auth/me时,一个应用程序具有正确的JWT格式的access_token,但在另一个应用程序中,它不采用JWT格式。
这是有效的jwt One:eyj0exaioijkv1qilcju ... eyjhdwqioijodhrwczov ... b84ciskwf2oore5n
这是非jwt One:paqabaaaaaaaaaaaaaaaaad--dla3vo7qrddgjrddgjjgjgjgjgjgjjgjjgjjgjjg7wwwrtrtsy Apply Apply and Apply Apply and Apply and Apply and wity
wayerty to y/appsy and wity to y/appsy to y/完全相同的。
知道如何修复第二个应用程序也显示JWT访问令牌吗?
When accessing /.auth/me, one app has the access_token in the correct JWT format, but in the other app it's not in JWT format.
This is the valid JWT one: eyJ0eXAiOiJKV1QiLCJu...eyJhdWQiOiJodHRwczov...B84ciSKwF2oOre5n
This is the non-JWT one: PAQABAAAAAAD--DLA3VO7QrddgJg7WevrTLy
The configuration for both apps appear to be identical.
Any idea how to fix the second app to also show JWT access token?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为参数之一,访问令牌没有形式(
JSON Web令牌)JWT令牌令牌格式。
您的应用程序需要的资源。要找到应用程序ID UI,在
Azure门户网站,单击Azure Active目录,单击应用程序
注册,单击服务应用程序,然后单击设置
和属性。
在其他情况下,仅用于访问应用程序服务,您可以使用
id_token
或 bearer 作为授权标题中的响应_type作为授权:bearer“ {your-id-id-token}”。参考: oauth 2.0授予凭据,访问令牌请求| Microsoft Docs
您可以使用 azure Resource Explorer 编辑App Service Auth的属性如果尚未包括在内的资源。请参阅资源提供者和类型<< /a>
要获取访问令牌,请尝试使用Azure Resource Explorer设置资源。
使用[资源的resource =&lt; name/id'']更新AddalloginParams,然后单击put。
例如:
然后通过保存更改并刷新应用程序服务,重试,检查访问令牌的值是否以JWT令牌的形式进行。
resource
as one of the parameter, the access token does not have form of a (
JSON Web Token)JWT token token format.
resource that your application requires . To find the App ID URI, in
the Azure portal, click Azure Active Directory, click App
registrations, click the service application, and then click Settings
and Properties.
In other cases just to access the app service you could use
id_token
or Bearer as response_type in authorization header as Authorization:Bearer "{your-id-token}".Reference:Oauth 2.0 grant credentials ,Access token request | Microsoft Docs
You can make use of azure resource explorer to edit the properties of the app service auth to include the resource if not already included. See resource provider and types
To get an access token, please try to set the resource using the Azure Resource Explorer.
Update the additionalLoginParams with ["resource=<Name/ID of the resource>"] and click on PUT.
For example:
Then by saving changes and refreshing the App Service, try again and check that the value for the access token is in the form of a JWT token or not.