Welcome Guest, Not a member yet? Register   Sign In
OpenID
#1

[eluser]bardelot[/eluser]
There's now an OpenID library in the Wiki: OpenID Library.

It's based on the PHP OpenID Library and an article about implementing OpenID in CakePHP

The library is not yet fully developed (I'm quite new to php) and unfortunately I have no time to continue atm. So anyone who wants to continue to improve the library is encouraged to do so.

To try the library you'll need an OpenID - I got mine from Verisign Labs and a second one from myOpenID

To get the library working you'll need PHP OpenID Library 2.x.x. Just place the Auth folder into your Library folder. The test controller implements the validation example that can be found in the PHP OpenID Library example folder.

Library supports:
- Provider Authentication Policy Extension
- Simple Registration Extension
#2

[eluser]vrillusions[/eluser]
I am having issues trying to get this to work. I get everything loaded, I enter my openid and authenticated and when I come back it gives a 404 error. Here is log information although not that helpful to me (what page is the 404 error referring to):

Code:
DEBUG - 2008-02-18 21:54:33 --> Config Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Hooks Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Router Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Output Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Input Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Global POST and COOKIE data sanitized
DEBUG - 2008-02-18 21:54:33 --> URI Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Language Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Loader Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Helpers loaded: url
DEBUG - 2008-02-18 21:54:33 --> Controller Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Language file loaded: language/english/openid_lang.php
DEBUG - 2008-02-18 21:54:33 --> Config file loaded: config/openid.php
DEBUG - 2008-02-18 21:54:33 --> OpenID Class Initialized
DEBUG - 2008-02-18 21:54:33 --> Helpers loaded: url
ERROR - 2008-02-18 21:54:33 --> 404 Page Not Found -->

This would be after going to site http://localhost/test/check?janrain_nonc...19T02:54%3...

(edit)This is CI 1.5.4 on Ubuntu 6.06 LTS and PHP 5.2(/edit)
#3

[eluser]bardelot[/eluser]
This is because Codeigniter does not allow all uri chars and GET arrays.
You could try changing $config['uri_protocol'] to "ORIG_PATH_INFO"
When you use "PATH_INFO" you'll get the 404, QUERY_STRING and REQUEST_URI will trigger the "The URI you submitted has disallowed characters." error.
#4

[eluser]cb_sides[/eluser]
Hey I am having the exact same problem. Forum user Moult wrote a nice tutorial regarding this with the same suggestion, however I still have the 404 problem.

http://thinkmoult.com/2009/02/22/use-cod...te-openid/

"Other nonces errors or authentication/redirection errors can be a problem with your CI configuration. Go to your system/application/config directory and edit your config.php file. Look for the uri_protocol option and try all of the options there. I find AUTO works fine for me but on my remote server apparently it only likes ORIG_PATH_INFO."

However, this hasn't fixed my problem yet either. Also won't this change the way your entire CI app works?

Any help or info would be greatly appreciated.
#5

[eluser]bojack[/eluser]
I am having a similar issue, which I think is based on CI's handling of URIs. I can get the library to work if I use 'index.php?controller/method' style URIs. But if I use mod_rewrite to remove the 'index.php?' bits, the library reports:

Code:
OpenID authentication failed: Invalid openid.mode ''

Has anyone else seen this and found a solution?
#6

[eluser]IkoTikashi[/eluser]
Hm, clean install of CI1.7.1 and all libs works just fine for me using /test as stated above. (using myOpenId as provider)
#7

[eluser]bojack[/eluser]
It looks like the problem is that my host requires an .htaccess rule like this:

Code:
RewriteRule ^(.*)$ /index.php?/$1 [L]

Note the '?'. I think this is causing the GET portion of the response to fail. After authenticating, the return url looks like:

Code:
http://example.com/openidtest/check?janrain_nonce=blahblahblah...

So this new, second '?' is not setting any $_GET vars. If I set
Code:
$config['enable_query_strings'] = TRUE;
I see the following in the output profile:

Code:
$_GET['/openidtest/check']  = '';
#8

[eluser]jakub[/eluser]
[quote author="bojack" date="1245444262"]It looks like the problem is that my host requires an .htaccess rule like this:

Code:
RewriteRule ^(.*)$ /index.php?/$1 [L]

Note the '?'. I think this is causing the GET portion of the response to fail. After authenticating, the return url looks like:

Code:
http://example.com/openidtest/check?janrain_nonce=blahblahblah...

So this new, second '?' is not setting any $_GET vars. If I set
Code:
$config['enable_query_strings'] = TRUE;
I see the following in the output profile:

Code:
$_GET['/openidtest/check']  = '';
[/quote]

To me it didn't seem like adding the 'RewriteRule' is necessary, I was able to just update:
Code:
$config['enable_query_strings'] = TRUE;
And it worked for me, however now I have run into a cURL issue with PHP on Windows, which

I am trying to fix using this reference:
http://www.vividreflection.com/blog/secr...n-windows/

Remember to enable the profiler if you are questioning wether GET/POST vars are coming through:
Code:
$this->output->enable_profiler(TRUE);
#9

[eluser]d910qf[/eluser]
I was getting the same error - I removed the ? from index.php? in .htaccess - seems okay now.




Theme © iAndrew 2016 - Forum software by © MyBB