我们在使用 OIDC 实现代码授权流程时与我们的 IdP 服务器团队进行了讨论,他们建议向名为“resourceServer”的 token 端点的 http 调用添加一个新的 http/query 参数,您认为 OIDC 实现应该可行吗?比如apache httpd oidc模块(经过认证的openid)要添加这样的参数吗? 谢谢
最佳答案
OpenID Connect 是基于 OAuth 2.0 构建的扩展,您必须检查规范以确定这是否违反它。
下面提到了通过 OAuth 2.0 的 token 端点,
... Parameters sent without a value MUST be treated as if they were omitted from the request. The authorization server MUST ignore unrecognized request parameters. Request and response parameters MUST NOT be included more than once.
如果您决定更改参数并将其添加到 token 请求中,则唯一的要求是您的授权服务器接受该参数。否则你的授权服务器将忽略它。
此外,在主要的 OpenID Connect 改编中还可以看到额外的参数。例如,MS Azure authorization request包含 resource 参数来声明将使用访问 token 的 protected 资源。它与您想要实现的目标类似。
关于apache - OpenId 连接 : adding extra/custom parameter at the token endpoint call,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54147357/