Thanks, I was able to get Auth working as you'd described. How can I implement an expiration date? I have a db field called start_date, and want to 'expire' the passcodes 30 days after they're created. I have a feeling that this logic should go in the Model, but with the Auth component working in the mix I'm not sure how to code it. Put a login method in the model that tests the age of the passcode? How can I set this up while still working with the Auth component?
thanks again for any help. On Dec 7, 10:31 am, Geoff Douglas <[email protected]> wrote: > I done something like this before. I called them tokens, and they are used > to log someone in. > > I user the $this->Auth->login({User Data}); method, from a controller. > (Cake1.3 > Docs <http://book.cakephp.org/view/1261/login> | Cake2.0 > Docs<http://book.cakephp.org/2.0/en/core-libraries/components/authenticati...> > ) > > What you can do is save the passcode value, and tie it to a user record. > Have the passcode login process, pull the passcode record, as well as the > associated User data, log them in via the Auth Login method. > > This is not a secure login, so as long as the application is not housing > any business critical data, or personal sensitive data, then this should > work for you. I would probably still store the passcode as a secure hash, > using the Security component, and have an expiration date on the > passcodes.. just for added safety. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
