asp.net core 3.x为什么使用资源所有者?

问题描述 投票:-1回答:1

某些专家说,resource owner是不正确的身份验证方法

Scoot Brady - IdentityServer Team for example

为什么Microsoft使用resource owner作为asp.net core 3.0中的默认流程?

链接:https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-api-authorization?view=aspnetcore-3.1

使用resource owner安全吗?

何时使用?

何时不使用?

asp.net asp.net-core oauth-2.0 identityserver4 openid
1个回答
0
投票

否,新的Angular模板(个人身份验证模板)使用资源所有者流,实际上,它正在使用Auth Code Flow + PKCE(代码交换的证明密钥)],即已经是本机应用程序和SPA的官方推荐。您可以使用Fiddler跟踪身份验证请求:

登录请求授权端点:

enter image description here

检查code_challengecode_challenge_method,即PKCE的代码流。另请参阅令牌请求:

enter image description here

注意grant_type

enter image description here

在代码流中+ PKCE:

  • 代替client_secret(在常规代码流中),客户端应用创建一个随机值code_verifier,对其进行散列并编码为code_challenge

  • 授权服务器存储哈希值(Code Challenge)以供以后验证,并且在用户进行身份验证之后,使用授权码重定向回应用程序。

  • 该应用程序发出交换令牌代码的请求,只有它发送代码验证程序而不是固定机密。


0
投票

否,新的Angular模板(个人身份验证模板)使用资源所有者流,实际上,它正在使用Auth Code Flow + PKCE(代码交换的证明密钥)],即已经是本机应用程序和SPA的官方推荐。您可以使用Fiddler跟踪身份验证请求:

登录请求授权端点:

enter image description here

检查code_challengecode_challenge_method,即PKCE的代码流。另请参阅令牌请求:

enter image description here

注意grant_type

enter image description here

在代码流中+ PKCE:

  • 代替client_secret(在常规代码流中),客户端应用创建一个随机值code_verifier,对其进行散列并编码为code_challenge

  • 授权服务器存储哈希值(Code Challenge)以供以后验证,并且在用户进行身份验证之后,使用授权码重定向回应用程序。

  • 该应用程序发出交换令牌代码的请求,只有它发送代码验证程序而不是固定机密。

© www.soinside.com 2019 - 2024. All rights reserved.