Re: Quick Auth component issue
Hey guys, thanks for the responses. So it looks like i was doing everything correctly except one minor thing. I was using md5 to encrypt my passwords, however the Auth component does not default to md5, so i had to set it. Then i had to modify the Security.salt key to blank in order for authorization to be complete. While i was having the issues, i was trying to look into the user details being sent to the login action, i was trying to see the password field, which kept coming up blank. Im not sure why i was seeing a blank password field in the data object, but $this- >data['User']['password'] was not showing any value. Anyways, authentication now works for me, and if anyone know if i was either using a wrong method to debug the issue, or another reason why password was blank it would be just nice to know. Thanks for all the help. Tony On Apr 9, 5:28 pm, John R <[EMAIL PROTECTED]> wrote: > Hint: input('password'); ?> > > On Apr 9, 2:16 pm, Baz <[EMAIL PROTECTED]> wrote: > > > Because there are so many bits and pieces associated with Auth, it's hard to > > diagnose your problem without ALL your code. However, let's try the reverse. > > Look at these: > > >http://book.cakephp.org/view/172/authenticationhttp://www.webdevelopm.. > > code sample) > > > And see if you're missing anything. > > Good luck. > > -- > > Baz L > > Web Development 2.0http://WebDevelopment2.com/ > > > On Wed, Apr 9, 2008 at 1:48 PM, Antonio Labriola <[EMAIL PROTECTED]> > > wrote: > > > > Hi guys, > > > > Hopefully someone could have a quick answer for me. I am trying > > > to use the auth component for authorization in my webapp. I have > > > activated the auth component and app_controller.php, and i have > > > created a users_controller,user model, and users table in the > > > database, all to the default specs laid out in cakephp. > > > >I just want this simple solution for now as proof of concept, but > > > i am having one issue. When trying to login on the form i created > > > using the form helper, it does not seem to be passing the password > > > back to the login action of the users_controller. It has the > > > username, but not the password. And i have double checked the naming > > > convention on the password field on the login form, and it seems to be > > > correct. > > > > Has anyone had anything similar to them? I didnt think it was > > > going to be this difficult to get the simple authorization up and > > > running. Any help would be appreciated, thanks. > > > > Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Quick Auth component issue
Hey guys, thanks for the responses. So it looks like i was doing everything correctly except one minor thing. I was using md5 to encrypt my passwords, however the Auth component does not default to md5, so i had to set it. Then i had to modify the Security.salt key to blank in order for authorization to be complete. While i was having the issues, i was trying to look into the user details being sent to the login action, i was trying to see the password field, which kept coming up blank. Im not sure why i was seeing a blank password field in the data object, but $this- >data['User']['password'] was not showing any value. Anyways, authentication now works for me, and if anyone know if i was either using a wrong method to debug the issue, or another reason why password was blank it would be just nice to know. Thanks for all the help. Tony On Apr 9, 5:28 pm, John R <[EMAIL PROTECTED]> wrote: > Hint: input('password'); ?> > > On Apr 9, 2:16 pm, Baz <[EMAIL PROTECTED]> wrote: > > > Because there are so many bits and pieces associated with Auth, it's hard to > > diagnose your problem without ALL your code. However, let's try the reverse. > > Look at these: > > >http://book.cakephp.org/view/172/authenticationhttp://www.webdevelopm.. > > code sample) > > > And see if you're missing anything. > > Good luck. > > -- > > Baz L > > Web Development 2.0http://WebDevelopment2.com/ > > > On Wed, Apr 9, 2008 at 1:48 PM, Antonio Labriola <[EMAIL PROTECTED]> > > wrote: > > > > Hi guys, > > > > Hopefully someone could have a quick answer for me. I am trying > > > to use the auth component for authorization in my webapp. I have > > > activated the auth component and app_controller.php, and i have > > > created a users_controller,user model, and users table in the > > > database, all to the default specs laid out in cakephp. > > > >I just want this simple solution for now as proof of concept, but > > > i am having one issue. When trying to login on the form i created > > > using the form helper, it does not seem to be passing the password > > > back to the login action of the users_controller. It has the > > > username, but not the password. And i have double checked the naming > > > convention on the password field on the login form, and it seems to be > > > correct. > > > > Has anyone had anything similar to them? I didnt think it was > > > going to be this difficult to get the simple authorization up and > > > running. Any help would be appreciated, thanks. > > > > Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Quick Auth component issue
Hint: input('password'); ?> On Apr 9, 2:16 pm, Baz <[EMAIL PROTECTED]> wrote: > Because there are so many bits and pieces associated with Auth, it's hard to > diagnose your problem without ALL your code. However, let's try the reverse. > Look at these: > > http://book.cakephp.org/view/172/authenticationhttp://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/(dow... > code sample) > > And see if you're missing anything. > Good luck. > -- > Baz L > Web Development 2.0http://WebDevelopment2.com/ > > On Wed, Apr 9, 2008 at 1:48 PM, Antonio Labriola <[EMAIL PROTECTED]> > wrote: > > > > > Hi guys, > > > Hopefully someone could have a quick answer for me. I am trying > > to use the auth component for authorization in my webapp. I have > > activated the auth component and app_controller.php, and i have > > created a users_controller,user model, and users table in the > > database, all to the default specs laid out in cakephp. > > >I just want this simple solution for now as proof of concept, but > > i am having one issue. When trying to login on the form i created > > using the form helper, it does not seem to be passing the password > > back to the login action of the users_controller. It has the > > username, but not the password. And i have double checked the naming > > convention on the password field on the login form, and it seems to be > > correct. > > > Has anyone had anything similar to them? I didnt think it was > > going to be this difficult to get the simple authorization up and > > running. Any help would be appreciated, thanks. > > > Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Quick Auth component issue
Because there are so many bits and pieces associated with Auth, it's hard to diagnose your problem without ALL your code. However, let's try the reverse. Look at these: http://book.cakephp.org/view/172/authentication http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/(downloadable code sample) And see if you're missing anything. Good luck. -- Baz L Web Development 2.0 http://WebDevelopment2.com/ On Wed, Apr 9, 2008 at 1:48 PM, Antonio Labriola <[EMAIL PROTECTED]> wrote: > > Hi guys, > > Hopefully someone could have a quick answer for me. I am trying > to use the auth component for authorization in my webapp. I have > activated the auth component and app_controller.php, and i have > created a users_controller,user model, and users table in the > database, all to the default specs laid out in cakephp. > >I just want this simple solution for now as proof of concept, but > i am having one issue. When trying to login on the form i created > using the form helper, it does not seem to be passing the password > back to the login action of the users_controller. It has the > username, but not the password. And i have double checked the naming > convention on the password field on the login form, and it seems to be > correct. > > Has anyone had anything similar to them? I didnt think it was > going to be this difficult to get the simple authorization up and > running. Any help would be appreciated, thanks. > > > Tony > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Quick Auth component issue
On Wed, Apr 9, 2008 at 2:48 PM, Antonio Labriola <[EMAIL PROTECTED]> wrote: > Has anyone had anything similar to them? I didnt think it was > going to be this difficult to get the simple authorization up and > running. Any help would be appreciated, thanks. Have you tried the various tutorials out there as there are quite a few good ones. Some of them are even on my blog listed below. Auth *is* simple to use and setup. -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephants to handling snakes..." @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Quick Auth component issue
This is what my form looks like: create('User',array('action' => 'login')); ?> error('User.username'); ?> input('User.username', array('label'=>'Username') ); ?> error('User.passwd'); ?> input('User.passwd', array('label'=>'Password') ); ? > submit('Submit', array('class' => 'submit')); ?> I don't name my field to be password, because that causes problems with MySQL, so I name it passwd instead. Maybe that is your problem? And your login() function in the UsersController is empty, right? On Apr 9, 11:48 am, Antonio Labriola <[EMAIL PROTECTED]> wrote: > Hi guys, > >Hopefully someone could have a quick answer for me. I am trying > to use the auth component for authorization in my webapp. I have > activated the auth component and app_controller.php, and i have > created a users_controller,user model, and users table in the > database, all to the default specs laid out in cakephp. > > I just want this simple solution for now as proof of concept, but > i am having one issue. When trying to login on the form i created > using the form helper, it does not seem to be passing the password > back to the login action of the users_controller. It has the > username, but not the password. And i have double checked the naming > convention on the password field on the login form, and it seems to be > correct. > > Has anyone had anything similar to them? I didnt think it was > going to be this difficult to get the simple authorization up and > running. Any help would be appreciated, thanks. > > Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---