Laravel auth sha-1
There is actually a easier (or more simple, at least) solution for a
case like this. you can 'fake' the hashing, by using this
method in the user model:
public function getAuthPassword() {
return Hash::make($this->password);
}
And hashing the input with your own hash function. For instance,
if your passwords are currently hashed with sha1,
you can validate the user with
Auth::attempt(array('email' => $email, 'password' => sha1($password))
It doesn't feel like good coding practice, to do it this way, but it will
certainly be easier than rewriting the hash module.
0 comments:
Post a Comment
Thanks