Any update on this ? I am stuck at the same point !

On Thursday, November 24, 2011 7:44:20 PM UTC+5:30, gloop wrote:
>
> Hello again,
>
> i try to program a LdapAuthentication and i need some help.
>
> First i need to configure the "$components" in /app/Controller/
> Component/AppController.php
>
> <?php
>   class AppController extends Controller {
>       var $components = array('Auth' => array(
>                                 'Ldap',
>                                                               'authError' 
> => 'Did you really think you are allowed to
> see that?',
>                                                             'authenticate' 
> => array(
>                                                             'Form' => 
> array(
>                                         'fields' => 
> array(        'username'
> => 'username',
>                                         
>                                         'password' =>
> 'password',
>                                         
>                                         'domain' => 'domain'
>                                          )
>                                     )
>                                 ),
>                                 'authorize' => true,
>                               ), 'Session');
>   }
> ?>
>
> Then i create a LdapAuthorize.php like
>
> http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#creating-custom-authorize-objects
>
> <?php
> App::uses('BaseAuthorize', 'Controller/Component/Auth');
>
> class LdapAuthorize extends BaseAuthorize {
>     public function authorize($user, CakeRequest $request) {
>       echo "test";
>     }
> }
>
> ?>
>
> But when i try to login with
>
> if ($this->Auth->login()) {
>     return $this->redirect($this->Auth->redirect());
> } else {
>     $this->Session->setFlash(__('Username or password is incorrect'),
> 'default', array(), 'auth');
> }
>
> cakephp doesn't use my authorize function.
>
> What i do wrong? Please help.
>
> Kind Regards
> gloop
>
>

-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to