How to authenticate login and password in cakephp using LDAP?

How do I authenticate users via LDAP?

my AppController looks like this:

  public function initialize()
{
    parent::initialize();

    $this->loadComponent('RequestHandler', [
        'enableBeforeRedirect' => false,
    ]);
    $this->loadComponent('Flash');
    $this->loadComponent('Upload');
    $this->loadComponent('Auth',[
        'authError' => 'Você não tem permissão para acessar essa página. Faça o Login!! ',
        'authenticate'=>[
            'Form' => [
                'fields'=>[
                    'username' => 'username',
                    'password' => 'password'
                    ]
            ]
        ],
        'loginRedirect' => [
            'controller' => 'Dashboard',
            'action' => 'index'
        ],
        'logoutRedirect' => [
            'controller' => 'Users',
            'action' => 'login'

        ]


    ]);

    /*
     * Enable the following component for recommended CakePHP security settings.
     * see https://book.cakephp.org/3.0/en/controllers/components/security.html
     */
    //$this->loadComponent('Security');
}

public function beforeFilter(Event $event)
{
    $this->set('username', $this->Auth->user('username'));
}