CakePHP在使用JanRain openid库时会出现哪些问题?
我正在实现一个 OpenID 消费者,并且使用 JanRain 类 (2.2.2) 开箱即用失败。具体来说,我看到以下症状:
- 消费者无法正确识别 openid_mode 参数
- 消费者无法找到 return_to 变量
我相当确定 CakePHP 导致了该问题,如 JanRain 消费者示例中的示例代码工作正常,但是一旦将其放入 CakePHP 控制器中,它就会失败。
我注意到 CakePHP 的调度程序设置了一个 $_GET[url] 参数,该参数混淆了 JanRain 验证,但我已经能够绕过这个参数(通过取消设置 $_GET['url'])。我希望有人可以提供一个简短的提示/技术列表,让 CakePHP 能够更友好地使用 JanRain 代码。
I'm implementing an OpenID consumer, and utilizing the JanRain classes (2.2.2) is failing out of the box. Specifically, I'm seeing the following symptoms:
- The consumer isn't able to correctly identify the openid_mode parameter
- The consumer has trouble finding the return_to variable
I'm fairly certain CakePHP is causing the issue, as the sample code in the JanRain consumer example works fine, but it fails as soon as it's placed within a CakePHP controller.
I have noticed that CakePHP's dispatcher sets a $_GET[url] parameter that confuses the JanRain validation, but I've been able to get around that one (by unsetting $_GET['url']). I'm hoping someone out there may have a short list of tips/techniques to get CakePHP to play friendlier with the JanRain code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很抱歉,我不太明白你的问题,但由于我已经成功使用 JanRain 插件很长一段时间了,所以我在设置它时至少记得一个提示:尝试降低 CakePHP 安全设置“高”到“中”甚至“低”,至少出于测试目的。
如果它没有帮助,并且您认为您知道代码的哪一部分导致了问题,请现在告诉我,我将为您提供我的来源。
I'm sorry I don't quite understand your problem, but since I am successfully using the JanRain plugin for quite a while now, here is at least one tip I remember from when I set it up : Try lowering your CakePHP security setting from "high" to "medium" or even "low", at least for testing purposes.
If it doesn't help, and you think you know what part of your code is causing the issue, let me now, I'll provide you with my sources.
尝试 CakePHP 的 OpenID 组件链接在此处,该组件会定期更新且有效
确保您有 lib CURL 和 openssl 扩展已启用
Try the OpenID component for CakePHP linked here which is regularly updated and works
Ensure you have lib CURL and openssl extensions enabled