Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Guard {
- ...
- * @return UserContract
- * @throws \Exception
- */
- public function user() :? UserContract
- {
- if (is_null($this->user) === false) {
- return $this->user;
- }
- try {
- $token = $this->resolveToken($this->tokenGetter->getToken());
- } catch (TokenNotPresentException $ex) {
- return null;
- }
- $this->claims = $token->getClaims();
- return $this->user = $token->getUser();
- }
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement