OIDC 不支持资源所有者密码凭证授予。为什么?我的一些客户端是安全设备,可以安全地维护凭据......这些凭据可用于获取 access_token。我还能使用 OpenID Connect 吗?
3 回答
It is not explicit in the specification but OpenID Connect supports all OAuth 2.0 flows since it is an extension of OAuth 2.0.
The spec talks about the flows that involve browser redirect as they are more common, more secure and less brittle given that resource owner credentials only supports username and password and is only in the OAuth 2 spec for backwards compatibility. In true SSO systems you'd want to abstract away from the method of authenticating the user at the OP/IDP. Involving a browser is a way to do that.
But your mileage may vary wrt. support in specific OP/AS software and client libraries.
FWIW: you should be looking to obtain an id_token rather than an access_token.
OpenID Connect 执行身份验证以登录最终用户或确定最终用户已登录。 OpenID Connect 以安全的方式将服务器执行的身份验证结果返回给客户端,以便客户端可以依赖它。
对于隐式和授权代码授权类型流,如果最终用户未登录,则无法发布 ID 令牌。在这种情况下,授权服务器可以向依赖方确认最终用户已登录。但是对于资源所有者授权类型流程,授权服务器无法确认最终用户已登录。即使最终用户未登录,您也可以发出访问令牌。