bearer middleware

This commit is contained in:
2024-10-22 11:09:35 +03:00
parent 215d2b1290
commit 7ccf0957bf
14 changed files with 141 additions and 9 deletions

View File

@ -33,6 +33,11 @@ class UserService
return false;
}
/**
* @param string $field
* @param string $value
* @return mixed
*/
public function getByField(string $field, string $value)
{
return User::where($field, $value)->first();
@ -72,4 +77,9 @@ class UserService
return '';
}
public function getByAccessToken(string $token)
{
return $this->getByField("access_token", $token);
}
}