I use laravel-passport to get the token(/oauth/token), the mode is password, the validation is passed, and oauth_access_tokens is stored in the record, but the postman has not received any response.
/**
* @param $username
* @return Model|\Illuminate\Database\Query\Builder|object|null
*/
public function findForPassport($username) {
$user_info = $this
->select([
'password',
'no'
])
->where('email', $username)
->first();
return $user_info;
}
/**
* @param $password
* @return bool
*/
public function validateForPassportPasswordGrant($password)
{
return $this->attributes['password'] == md5($password . md5( $this->attributes['no']));
}
'api' => [
'driver' => 'passport',
'provider' => 'accounts',
],
'accounts' => [
'driver' => 'eloquent',
'model' => App\Entities\User::class,
],
have no error message.