lightopenid

Using data in an array

删除回忆录丶 提交于 2020-01-15 11:56:07
问题 On my php page, I am getting the follow output: Array ( [contact/email] => users_name@email_address.com ) This is produced via the following line in the php code: print_r($openid->getAttributes()); How do I extract the text users_name@email_address.com from that array and stick it into a variable $strEmail; ? So when I echo the variable: echo $strEmail; It should output the following on screen: users_name@email_address.com 回答1: Assign the array to a variable and then you can easily access it:

what is call to function $openid->validate do?

两盒软妹~` 提交于 2019-12-23 23:08:01
问题 I m trying to use openid as my login system. For that I used following code <?php require 'openid.php'; try { if(!isset($_GET['openid_mode'])) { if(isset($_GET['login'])) { $openid = new LightOpenID; $openid->identity = 'https://www.google.com/accounts/o8/id'; $openid->required = array('contact/email'); header('Location: ' . $openid->authUrl()); } ?> <form action="?login" method="post"> <button>Login with Google</button> </form> <?php } elseif($_GET['openid_mode'] == 'cancel') { echo 'User

Janrain OpenId vs lightopenid PHP libraries

别来无恙 提交于 2019-12-23 21:12:11
问题 What are the differences between the PHP implementation of Janrain's PHP OpenID library and the LightOpenID. Is one more secure than the other? According to Google's best practices page: A correct OpenID implementation has to: cover checking of cryptographic signatures checking of nonces Yadis discovery I'm guessing the Janrain's library does fulfill all these requirements as Google recommends the library, but is the LightOpenID fulfilling 1 & 2. 回答1: LightOpenID uses the stateless version of

Getting a gmail address with… openid? oauth?

馋奶兔 提交于 2019-12-21 16:17:12
问题 I'm getting confused. I was able to make openid login kinda work using LightOpenID. All I get doing that is just an openid_identity such as " https://www.google.com/accounts/o8/id?id=xxx ". Pretty disappointing: I was expecting to get the email address too. i.e. I need to login (that's what openid does) and to know the email address of the google account the user used to login. There is the function $openid->getAttributes() but all I get from that is just an empty array: I guess google isn't

Login through Google in Codeigniter via LightOpenID

只谈情不闲聊 提交于 2019-12-11 18:05:24
问题 I used the instructions given in this answer to setup login through Google via LightOpenId. It's working fine up till the point where it has to check $openid->mode to find out whether google has verified the login credentials. The Url received from Google does have the openid.mode=id_res parameter. But $openid->mode variable from the library still returns false, meaning that it's not verified. Please help! 回答1: I was able to use the StackOverflow question you referenced and implement the

Do the Google and Yahoo implementations of OpenID respect the “required” attribute?

笑着哭i 提交于 2019-12-11 12:42:04
问题 I would like to use OpenID (PHP and LightOpenID) to get the following user information: $openid->required = array( 'namePerson', 'namePerson/first', 'namePerson/last', 'contact/email', 'person/guid', 'birthDate/birthYear', 'birthDate/birthMonth', 'birthDate/birthday', 'gender', ); However, I found that both Yahoo and Google return only the following data: Array ( [namePerson] => abc [contact/email] => abc@example.com ) Is there something wrong with my code? Can I force Google and Yahoo to

LightOpenID - Provider issued an assertion for an Identifier whose discovery info did not match

让人想犯罪 __ 提交于 2019-12-08 04:42:50
问题 This is the error I get after logging into Stack with my LightOpenID provider script. The OpenID Provider issued an assertion for an Identifier whose discovery information did not match. Assertion endpoint info: ClaimedIdentifier: http ://sub.mydomain.net/?cgillis ProviderLocalIdentifier: http ://sub.mydomain.net/?cgillis ProviderEndpoint: http ://sub.mydomain.net/ OpenID version: 2.0 Service Type URIs: Discovered endpoint info: [{ ClaimedIdentifier: http ://specs.openid.net/auth/2.0

LightOpenID - Provider issued an assertion for an Identifier whose discovery info did not match

随声附和 提交于 2019-12-07 21:42:28
This is the error I get after logging into Stack with my LightOpenID provider script. The OpenID Provider issued an assertion for an Identifier whose discovery information did not match. Assertion endpoint info: ClaimedIdentifier: http ://sub.mydomain.net/?cgillis ProviderLocalIdentifier: http ://sub.mydomain.net/?cgillis ProviderEndpoint: http ://sub.mydomain.net/ OpenID version: 2.0 Service Type URIs: Discovered endpoint info: [{ ClaimedIdentifier: http ://specs.openid.net/auth/2.0/identifier_select ProviderLocalIdentifier: http ://specs.openid.net/auth/2.0/identifier_select ProviderEndpoint

Getting a gmail address with… openid? oauth?

那年仲夏 提交于 2019-12-04 08:13:34
I'm getting confused. I was able to make openid login kinda work using LightOpenID . All I get doing that is just an openid_identity such as " https://www.google.com/accounts/o8/id?id=xxx ". Pretty disappointing: I was expecting to get the email address too. i.e. I need to login (that's what openid does) and to know the email address of the google account the user used to login. There is the function $openid->getAttributes() but all I get from that is just an empty array: I guess google isn't going to give me anything else than that openid_identity . So I guess I'm supposed to use OAuth ,

Is Google the only OpenID provider that requires “identifier_select”?

走远了吗. 提交于 2019-12-03 11:49:05
问题 I am developing an OpenID consumer in PHP and am using the fantastic LightOpenID library (http://gitorious.org/lightopenid). Basing my code off of that found in the example client script I have successfully created a consumer. However, I've run across a snag: Google requires the openid.identity and openid.claimed_id to be set to "http://specs.openid.net/auth/2.0/identifier_select" (see here). If I do that it works but other providers (i.e. AOL) don't. Here are my questions: Is Google a corner