授权服务器如何验证Oauth2.0中的client_secret

How does the Authorization server validates the client_secret in Oauth2.0

在 OAuth2.0 的上下文中,在 RO(资源所有者)批准同意后(点击“允许”)- AS(授权服务器)将客户端重定向到 redirect_uri 通过由客户端添加查询参数,例如(代码和状态):

https://example-app.com/redirect?code=<the auth code>&state=<state>

然后客户端应交换(将这些发送到 AS):authorization_code + client_id + client_secret 以获得 访问令牌

Okta 定义了 client_secret as such:

client_secret - The application’s client secret. This ensures that the request to get the access token is made only from the application, and not from a potential attacker that may have intercepted the authorization code

但是 授权服务器究竟如何知道如何验证客户端创建的这个 client_secret ???

客户端没有创建客户端密码。当您在授权服务器上创建新客户端时,授权服务器会生成客户端密码(如果客户端类型为机密,则 public 客户端没有密码)。您从授权服务器获取 client_id 和 client_secret 并在您的客户端中使用它。