EllisLab text mark
Advanced Search
1 of 26
1
   
A3M - Account Authentication & Authorization Module
Posted: 11 February 2010 04:04 AM   [ # 11 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

lol sorry, i really have no experience with LDAP. maybe u can write LDAP support and share with the rest of us =p

i’m working on facebook connect at the moment. in fact im totally rewriting this module with internationalization support

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 11 February 2010 05:24 AM   [ # 12 ]   [ Rating: 0 ]
Joined: 2010-02-08
5 posts

can’t wait to mess around with this a bit.

 
Posted: 11 February 2010 09:51 AM   [ # 13 ]   [ Rating: 0 ]
Joined: 2010-01-12
20 posts

For anyone who is trying this out and getting the error message - “Field ‘user_data’ doesn’t have a default value”, it is because you are using mysql 5+ in strict mode, which means null fields cannot be left empty, so to fix this when setting up the ci_sessions table change:

`user_data` text NOT NULL,

to

`user_data` text DEFAULT NULL,

in the sql file.

 
Posted: 11 February 2010 08:59 PM   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2008-02-17
278 posts

Great job Peng Kong, I’m subscribing to this thread and definitely will try this library.

 
Posted: 11 February 2010 09:54 PM   [ # 15 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

thanks steelaz & chiefchirpa.

i’m giving the library a full re-factoring at the moment. Notice that everything is more or less stuffed into one controller and one language file at the moment. that’s kind of doesn’t scale too well. so the next ver (0.4) there will definitely be even more ‘separation’ meaning ‘cleaner’ codes.

i’m also trying to consider a suggestion of creating a abstract layer (something like ci db layer) for authentication to further decouple anything i code i write. still not sure how’s that going to work out at this point, so if anyone has any ideas feel free to chip in smile

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 12 February 2010 02:23 AM   [ # 16 ]   [ Rating: 0 ]
Joined: 2005-07-01
2 posts

Hi Peng,

I’m using your packet as a platform for learning, and was curious if the installation package will allow signups “out of the box” so to speak as provided.  I’m getting the welcome screen for A3M, but clicking on the Sign In or Sign Out links hits a 404 not found, looking for:

http://localhost/a3m/account/signup

Or if I have to build my own signup form smile

 
Posted: 12 February 2010 02:43 AM   [ # 17 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

check the htaccess and config.php baseurl.
you shouldn’t be getting 404 when u click sign in
signin and signup is both implemented.
you can look at the demo i’ve setup http://it.euphoriatwentythree.com/projects/a3m/

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 13 February 2010 01:40 AM   [ # 18 ]   [ Rating: 0 ]
Joined: 2005-07-01
2 posts

Thanks Peng!  I was able to get it working by modifying the base path and index filename smile

 
Posted: 18 February 2010 04:18 PM   [ # 19 ]   [ Rating: 0 ]
Joined: 2009-04-30
6 posts

Doesn’t work for me in several ways:

need to change:

$password_reset_url site_url('account/reset_password?email='.$email.'&token;='.sha1($email.$time.$this->config->item('password_reset_secret'))); 

to:

$password_reset_url site_url('account/reset_password/&email;='.$email.'&token;='.sha1($email.$time.$this->config->item('password_reset_secret'))); 

and:

$verification_url site_url('account/verification?email='.$email.'&token;='.sha1($email.$this->config->item('verification_secret'))); 

to:

$verification_url site_url('account/verification/&email;='.$email.'&token;='.sha1($email.$this->config->item('verification_secret'))); 

Also logging using google account doesn’t work, when I click on google icon (http://poradnice.shy.cz/account/signin) i got redirected back with no error or log message.

 
Posted: 18 February 2010 10:40 PM   [ # 20 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

you mean u needed to add ; behind the $email? i don’t see how that helps but ok whatever works smile

try logging in using google in my demo https://it.euphoriatwentythree.com/projects/a3m/

does it work? because it works for my on my but not on yours… so im suspecting server configuration.

what version of php are you using? if you’re using 5.3 it doesn’t work for sure but i know the fix.

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 19 February 2010 05:45 AM   [ # 21 ]   [ Rating: 0 ]
Joined: 2009-04-30
6 posts
Peng Kong - 19 February 2010 03:40 AM

you mean u needed to add ; behind the $email? i don’t see how that helps but ok whatever works smile

try logging in using google in my demo https://it.euphoriatwentythree.com/projects/a3m/

does it work? because it works for my on my but not on yours… so im suspecting server configuration.

what version of php are you using? if you’re using 5.3 it doesn’t work for sure but i know the fix.

No no:

account/reset_password?email=
account/reset_password/&email;= 

I need to change “?” to “/&”, because else arguments are not recognizet as get (there are not in $_GET). The “;” must have been added by the forum (I don’t have it in my code before posting).

Here you can see my server configuration:

http://stuff.shy.cz/phpinfo.php 

Everything else in CodeIgniter works.

I ofcourse tried you demo, which worked.

Edit: Just ignore the “;” in first code, the bloody forum add it again.

 
Posted: 19 February 2010 06:24 AM   [ # 22 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

Ok that weird cause GET is after ? Usually… anyway.
So yep… sorry i didn’t test on other server configs and imp developing on a windows machines. My server is a Linux machine of cause.

So your only problem is that google isn’t working right?
Ok you gotta’ test if phpopenid package is working properly first.

Here’s how to do that:

1) Download http://openidenabled.com/files/php-openid/packages/php-openid-2.1.3.zip
2) Extract it and upload it to your server
3) In the examples folder there is a file called detect.php
  Simply run that file and see what is wrong.

oh duh ok… i think the reason is your cache/nonces cache/associations and cache/temp folders aren’t writable? if that isn’t the reason try the above 3 steps.

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 19 February 2010 08:01 AM   [ # 23 ]   [ Rating: 0 ]
Joined: 2009-04-30
6 posts
Peng Kong - 19 February 2010 11:24 AM

Ok that weird cause GET is after ? Usually… anyway.
So yep… sorry i didn’t test on other server configs and imp developing on a windows machines. My server is a Linux machine of cause.

Yes, when I changed it, it works fine, don’t know why the:

something/something?param=value

doesn’t pass the value. If anybody knows I would be glad to know too. smile

But

something/something/&param=value

works fine.

Peng Kong - 19 February 2010 11:24 AM

So your only problem is that google isn’t working right?
Ok you gotta’ test if phpopenid package is working properly first.

Here’s how to do that:

1) Download http://openidenabled.com/files/php-openid/packages/php-openid-2.1.3.zip
2) Extract it and upload it to your server
3) In the examples folder there is a file called detect.php
  Simply run that file and see what is wrong.

oh duh ok… i think the reason is your cache/nonces cache/associations and cache/temp folders aren’t writable? if that isn’t the reason try the above 3 steps.

I checked cache folders before and they are writable. You can see detect.php on following link:

http://stuff.shy.cz/php-openid-2.1.3/examples/detect.php

Seems to be problem with:
HTTP Fetching
An HTTP request was completed. Got 503 instead of the expected HTTP status code (200 or 206). The redirected URL was not returned. Unexpected data was returned.

I’ll be glad if you could look in to it.

 
Posted: 19 February 2010 09:53 AM   [ # 24 ]   [ Rating: 0 ]
Avatar
Joined: 2009-08-06
195 posts

your server seems perfectly fine. that 503 thing isn’t important i think. cuz my server has the exact same thing but it still works. oh…. SSL is your page using SSL. for google it’s a must

ah yes im quite sure that’s the problem… no https on your signin page which is a must for google. you openid should work if you try with chi.mp or myopenid or try with AOL or myspace

 Signature 

http://sg.shownearby.com
http://www.shownearby.com/family/members/pk/
A3M http://code.google.com/p/a3m/

 
Posted: 19 February 2010 09:57 AM   [ # 25 ]   [ Rating: 0 ]
Joined: 2009-04-30
6 posts
Peng Kong - 19 February 2010 02:53 PM

your server seems perfectly fine. that 503 thing isn’t important i think. cuz my server has the exact same thing but it still works. oh…. SSL is your page using SSL. for google it’s a must

ah yes im quite sure that’s the problem… no https on your signin page which is a must for google. you openid should work if you try with chi.mp or myopenid or try with AOL or myspace

Ok, I try switch SSL on and different account.

I would be best I some error or log message is generated about need of SSL.

 
1 of 26
1