| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function getUser($credentials, UserProviderInterface $userProvider): UserInterface |
||
| 35 | { |
||
| 36 | $jwtToken = $this->tokenParser->parse($credentials); |
||
| 37 | |||
| 38 | if (null === $username = $jwtToken->get($this->identityClaim ?? Claims::SUBJECT)) { |
||
| 39 | throw new AuthenticationException('Username could not be identified.'); |
||
| 40 | } |
||
| 41 | |||
| 42 | return $userProvider->loadUserByUsername($username); |
||
| 43 | } |
||
| 45 |