dongyong6428 2010-12-31 00:02
浏览 29
已采纳

如何使用Janrain openid库获取规范化URL?

I'm trying to implement openId for my site and am using Janrain's library with php. I want to check if openId user provided is already stored in database. I want to compare only normalized uri's to avoid situation when user sometimes doesn't type in "http://..." etc. Now, I'm having trouble finding out specific function that can normalize uri for me right after user enters openId, so as soon as it hits my server, before anything is being send to openId provider. btw as you can imagine slowly I am getting fed up with trying to get all this working, but still willing to give it a try so any help would be much appreciated.

  • 写回答

2条回答 默认 最新

  • dongnanman9093 2010-12-31 00:32
    关注

    (Assuming you mean Janrain's "OpenID Enabled" PHP5 library, v 2.2.2 or thereabouts.) There is Auth_OpenID::normalizeUrl($url) defined in OpenID.php, however it is marked as @access private. Initiating an authorization transaction will get you a normalized URL as a result of the process, but that's not really what you are looking for. You could ignore the private access, hack the library to make it public, and then just keep your patch implemented as you upgrade versions (if they ever release one). Alternatively, you could just look at what they're doing and copy it out to a function of your own, avoiding any library hacks and the associated version control issues.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧
  • ¥15 #MATLAB仿真#车辆换道路径规划