Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function authenticate(TokenInterface $token) |
||
32 | { |
||
33 | $authenticatedToken = parent::authenticate($token); |
||
34 | if (empty($authenticatedToken)) { |
||
35 | throw new AuthenticationException('The token is not supported by this authentication provider.'); |
||
36 | } |
||
37 | |||
38 | $this->repository->getPermissionResolver()->setCurrentUserReference( |
||
39 | $authenticatedToken->getUser()->getAPIUser() |
||
40 | ); |
||
41 | |||
42 | return $authenticatedToken; |
||
43 | } |
||
44 | } |
||
45 |