retrieve value from query string

旧街凉风 提交于 2019-12-11 22:29:33

问题


I am integrating openid in my website. I am able to retrieve data(ex email) from op provider(by query string). But different op provider gives data in different key like gmail gives it under openid.ext1.value.alia2 key and yahoo gives it in under some different key. how should i retrieve value from query string.


回答1:


You must check namespaces. For example, the server may return openid.ns.ax = http://openid.net/srv/ax/1.0, and that would mean "everything that starts with openid.ax relates to the AX extension".
But it could be openid.ns.qwerty = http://openid.net/srv/ax/1.0 as well, and then everything that starts with openid.qwerty would be related to the extension.

Your code must read those namespaces and use aliases as defined by those. Read specifications for more information.



来源:https://stackoverflow.com/questions/3264677/retrieve-value-from-query-string

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!