Re: Extending the blog tutorial to include login?
AD7six, I'd be glad to share what I have. I'm fixing a few bugs in it, but I'll try to post it soon and let you know. Yours was nice . . . --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Extending the blog tutorial to include login?
For an example of it check rdBloggery from http://cakeforge.org/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Extending the blog tutorial to include login?
Samuel DeVore wrote: > I think the plan for the cake bakery tutorial is to include this. > > https://trac.cakephp.org/wiki/BuildingCakeBakery > That is the plan, but unfortunately many people needed this functionality 3 months ago. And as it stands, the Bakery hasn't been updated for the last 2 months. I'm not harping on the developers in any way. I fully understand they are busy and the Bakery is going to be a giant massive application to show every parts of Cake, but in the mean time there does need to be a very simple tutorial on building an Auth system; which then can tie in perfectly with an intro and tutorial on using the built in ACL system. After all, an ACL system is pointless if you don't have an Auth system. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Extending the blog tutorial to include login?
Hi All, The source code for http://www.noswad.me.uk/demos/chat/ now includes a component used for authentification (which simply makes use of the Pear:Auth package), it may be useful in considering how to use simple authentification. The chat doesn't restrict anonymous users, but could easily do so if there is no logged in user. To restrict access for a controller if there is no user logged in one would create a function in app_controller such as: function _checkLoggedIn() { if ($this->Authorise->uid) { return true: } else { $this->Session->setFlash ("You aren't logged in'"); $this->controller->redirect ("/"); die; // Prevent any further processing whatsoever. } } and call it in the beforeFilter of your controller ( if defined in AppController it would be called for all controllers - careful to still give the user a chance to access the login page if you do this ;) ) Hydra12, I'm curious if there are any benefits we can glean from each other's code with regards to the Ajax chat example. Comments welcome, AD7six --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Extending the blog tutorial to include login?
I don't know if this will help or not, but I built a simple chat app to play with sessions and ajax. When a user first goes to my controller (/messages/index), it checks to see if the session variable Users.username is set. If it is, it continues on to the rest of the index code; if not, it redirects to my /users/index controller to make them login. At login, it sets the Users.username session variable, then redirects back to /messages/index. I have it set to check this every time anything happens. I don't have the code with me (it's on my work laptop), but I can post it if you're interested. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Extending the blog tutorial to include login?
I think the plan for the cake bakery tutorial is to include this. https://trac.cakephp.org/wiki/BuildingCakeBakery On 5/5/06, Carlos Mauricio Samour <[EMAIL PROTECTED]> wrote: I would like help in what skills should I learn before building alogin authentication features in my cake apps. Thanks!On 5/5/06, roberts.sean <[EMAIL PROTECTED] > wrote:>> The blog tutorial was great, but I think it left out a crucial step:> securing it from malicious users who want nothing more than to make a> series of "hahaha lol owned you" posts on your blog. The section in > the manual on ACL was interesting, but it said that you should already> have your own user authentication setup. The rdAuth tutorial in the> Wiki was confusing at best.>> Does anyone know of a tutorial that extends the blog tutorial to > include a minimal amount of security? I've gotten as far as writing a> small script to determine whether or not a user's login credentials are> any good, but when it comes down to making this persistent among my > pages I'm pretty lost!>> If anyone knows of a tutorial like this, or can explain to me how I> would go about maintaining a persistent "logged in" status for a user> among different models and controllers I would really appreciate it. >> Thanks!>>> >> --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Extending the blog tutorial to include login?
I would like help in what skills should I learn before building a login authentication features in my cake apps. Thanks! On 5/5/06, roberts.sean <[EMAIL PROTECTED]> wrote: > > The blog tutorial was great, but I think it left out a crucial step: > securing it from malicious users who want nothing more than to make a > series of "hahaha lol owned you" posts on your blog. The section in > the manual on ACL was interesting, but it said that you should already > have your own user authentication setup. The rdAuth tutorial in the > Wiki was confusing at best. > > Does anyone know of a tutorial that extends the blog tutorial to > include a minimal amount of security? I've gotten as far as writing a > small script to determine whether or not a user's login credentials are > any good, but when it comes down to making this persistent among my > pages I'm pretty lost! > > If anyone knows of a tutorial like this, or can explain to me how I > would go about maintaining a persistent "logged in" status for a user > among different models and controllers I would really appreciate it. > > Thanks! > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Extending the blog tutorial to include login?
On May 5, 2006, at 2:33 PM, roberts.sean wrote: > > The blog tutorial was great, but I think it left out a crucial step: > securing it from malicious users who want nothing more than to make a > series of "hahaha lol owned you" posts on your blog. The section in > the manual on ACL was interesting, but it said that you should already > have your own user authentication setup. The rdAuth tutorial in the > Wiki was confusing at best. The Blog tute is meant to be extremely simple. While security is an important part of any application, the Blog in the tute isn't a real application, but a tool for teaching folks about Cake. > Does anyone know of a tutorial that extends the blog tutorial to > include a minimal amount of security? I've gotten as far as writing a > small script to determine whether or not a user's login credentials > are > any good, but when it comes down to making this persistent among my > pages I'm pretty lost! Cake automatically starts a session, you just need to read up on sessions in PHP. That's how you manage persistent information using the system. You can use sessions however you want, but Cake has some helps there, too. There's sections in the manual that address those helps, but read the PHP docs (and Google) for info about using Sessions first. > If anyone knows of a tutorial like this, or can explain to me how I > would go about maintaining a persistent "logged in" status for a user > among different models and controllers I would really appreciate it. Depends what you want to do I guess. The beforeFilter in controllers is a great place to put access checking functions. But that all depends on how you're using your sessions. --- J --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Extending the blog tutorial to include login?
The blog tutorial was great, but I think it left out a crucial step: securing it from malicious users who want nothing more than to make a series of "hahaha lol owned you" posts on your blog. The section in the manual on ACL was interesting, but it said that you should already have your own user authentication setup. The rdAuth tutorial in the Wiki was confusing at best. Does anyone know of a tutorial that extends the blog tutorial to include a minimal amount of security? I've gotten as far as writing a small script to determine whether or not a user's login credentials are any good, but when it comes down to making this persistent among my pages I'm pretty lost! If anyone knows of a tutorial like this, or can explain to me how I would go about maintaining a persistent "logged in" status for a user among different models and controllers I would really appreciate it. Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---