如何获取url端点openid提供程序

时间:2010-07-15 12:59:43

标签: openid openid-provider

如果我们来自https://www.google.com/accounts/o8/id或者yahoo是http://me.yahoo.com,那么如何获取像google这样的openid提供商的终点网址。同样,对于其他人来说如何找到这些信息。

2 个答案:

答案 0 :(得分:2)

你可以在js文件中有这样的东西.. var defaultProviders = { google: { name: 'Google', url: 'https://www.google.com/accounts/o8/id', hasLargeIcon: true }, yahoo: { name: 'Yahoo', url: 'http://me.yahoo.com/', hasLargeIcon: true }, aol: { name: 'AOL', label: 'Enter your AOL screenname:', url: 'http://openid.aol.com/{username}', hasLargeIcon: true }, myopenid: { name: 'MyOpenID', label: 'Enter your MyOpenID username:', url: 'http://{username}.myopenid.com/', hasLargeIcon: true }, openid: { name: 'OpenID', url: 'http://', hasLargeIcon: true }, livejournal: { name: 'LiveJournal', label: 'Enter your Livejournal username:', url: 'http://{username}.livejournal.com/', hasLargeIcon: false }, wordpress: { name: 'Wordpress', label: 'Enter your Wordpress.com username:', url: 'http://{username}.wordpress.com/', hasLargeIcon: false }, blogger: { name: 'Blogger', label: 'Enter your Blogger account:', url: 'http://{username}.blogspot.com/', hasLargeIcon: false }, verisign: { name: 'Verisign', label: 'Enter your Verisign username:', url: 'http://{username}.pip.verisignlabs.com/', hasLargeIcon: false }, claimid: { name: 'ClaimID', label: 'Enter your ClaimID username:', url: 'http://openid.claimid.com/{username}', hasLargeIcon: false }, clickpass: { name: 'ClickPass', label: 'Enter your ClickPass username:', url: 'http://clickpass.com/public/{username}', hasLargeIcon: false } };

一旦username可用,您可以使用以下代码创建完整的URL ... `function(event){                     var cancel = true;                     var val = $('input [type = text]',username).val();                     if(val.length> 0){                         var pvd = providers [selectedId];                         if(pvd){                             _setLoading(true,true);                              var url = pvd.url.replace('{username}',val);                             _setOpenIdUrl(URL);                             _setCookie(selectedId);                               alert(“URL is:”+ url);
                                   input.get()[0] .form.submit();                         }                     }                     if(cancel){                         event.preventDefault();                     }
                };” 那大部分时间都可以工作....

答案 1 :(得分:0)

转到相关网站并浏览他们的文档。 OP标识符没有权威或完整列表。