Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow NULL password #7

Open
johanvanderkuijl opened this issue Mar 11, 2016 · 0 comments
Open

Allow NULL password #7

johanvanderkuijl opened this issue Mar 11, 2016 · 0 comments

Comments

@johanvanderkuijl
Copy link

I user LDAP for authentication, so I don't store passwords in my users table.

// after authentication by LDAP
$this->Cookie->write('CookieAuth', [
    'username' => $this->request->data('username'),
    'password' => null 
]);

I still want users to be identified by the username, so I had to comment a line out

if (empty($cookies[$username]) /*|| empty($cookies[$password])*/) {
    return false;
}

// the user can be found by his username. The password field is not mandatory
// in BaseAuthenticate.php
$user = $this->_findUser($cookies[$username], $cookies[$password]);
if ($user) {
    return $user;
}

Is this reasonable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant