WSO2 - 无法使用 oidc 库执行静默登录

标签 wso2 x-frame-options openid-connect

我正在使用 oidc JS cilent 库 OIDC JS

我有连接到 的客户端代码WSO2 IDP 服务器使用 openID 连接端点。流程是 隐式 在 WSO2 服务器上配置

WSO2 版本:wso2is-5.3.0

正常登录工作正常。当涉及到访问 token 的静默刷新时,它失败了。
我正在使用 oidc 的“signinSilent”方法通过 iframe 进行静默登录并获取最新的访问 token 。

这适用于 Gluu 服务器。

这是我们得到的错误截图,
enter image description here

错误:

Refused to display '<idp authz url>' in a frame because it set 'X-Frmae-Options' to 'deny'

最佳答案

您可以转到 {carbonhome}/repository/deployment/server/webapps/oauth2/WEB-INF 并将其添加到 HttpHeaderSecurityFilter:

<init-param>
  <param-name>antiClickJackingEnabled</param-name>
  <param-value>false</param-value>
</init-param>
这将禁用 X-Frame-Options header ,从而允许所有域。但是,在执行此操作时要小心。您还可以设置 antiClickJackingOptions 并定义允许使用它的域。

关于WSO2 - 无法使用 oidc 库执行静默登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46786265/

相关文章:

.net - Google 的 OpenIDConnect 返回一个无法解析的 Base64 token

WSO2 身份服务器 - 限制对 SSO 服务的访问

javascript - 在脚本中介器 esb wso2 中获取错误 'Cannot read property "长度“来自未定义”

wso2 - 设置 WSO2 EMM

X-Frame-Options 和 Content-Security-Policy header 之间的安全区别?

content-security-policy - 用CSP替换X-Frame-Options

iframe - 仅删除特定 Controller 的 "X-Frame-Options" header

wso2 - CEP 如何检测和报告流中的重复项?

oauth-2.0 - 我们如何使用 GitHub 帐户作为 AWS Cognito 身份提供商?

authentication - OpenID Connect,如果尚未登录,则无需登录表单即可重定向?