laravel jwttoken jwt attempt laravel auth->attempt() 返回false

When in the use of json web token (jwttoken) we will offer a variety of ways in which the official has a great situation will use to attempt method , but when using this method may encounter the return value of false cases , Now we have to analyze the return value of several cases of false

1, account password

First of all meaning attempt method is to try to authenticate the user and returns a token , first verify the identity of the user needs to query the user table corresponding account password is correct , if not correct false returns

2, configuration items

When we need to use jwt in laravel framework of some configuration details, refer to my other article https://www.cnblogs.com/mzli/p/10637214.html  There is talk about specific configuration, if account password is correct, then also returns false if you want to review our specific configuration items as follows


3, encryption
encryption method here is divided into two, the first: the user table encryption password field, second: attempt encryption method, the default encryption attempt to Bcrypt 
so this time if we users encryption table, if not identical, then it returns false, if you need to need to attempt the same two encryption modes
bcrypt known HASH :: make () laravel framework of the default encryption method is HASH ::: make

 

 

 
 
 
 

Guess you like

Origin www.cnblogs.com/mzli/p/11975913.html