|
12 | 12 | namespace FOS\OAuthServerBundle\Security\Authentication\Provider; |
13 | 13 |
|
14 | 14 | use FOS\OAuthServerBundle\Security\Authentication\Token\OAuthToken; |
| 15 | +use Symfony\Component\HttpFoundation\Response; |
15 | 16 | use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface; |
16 | 17 | use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; |
17 | 18 | use Symfony\Component\Security\Core\Exception\AuthenticationException; |
@@ -74,7 +75,7 @@ public function authenticate(TokenInterface $token) |
74 | 75 | try { |
75 | 76 | $this->userChecker->checkPreAuth($user); |
76 | 77 | } catch (AccountStatusException $e) { |
77 | | - throw new OAuth2AuthenticateException(OAuth2::HTTP_UNAUTHORIZED, |
| 78 | + throw new OAuth2AuthenticateException(Response::HTTP_UNAUTHORIZED, |
78 | 79 | OAuth2::TOKEN_TYPE_BEARER, |
79 | 80 | $this->serverService->getVariable(OAuth2::CONFIG_WWW_REALM), |
80 | 81 | 'access_denied', |
@@ -103,7 +104,7 @@ public function authenticate(TokenInterface $token) |
103 | 104 | try { |
104 | 105 | $this->userChecker->checkPostAuth($user); |
105 | 106 | } catch (AccountStatusException $e) { |
106 | | - throw new OAuth2AuthenticateException(OAuth2::HTTP_UNAUTHORIZED, |
| 107 | + throw new OAuth2AuthenticateException(Response::HTTP_UNAUTHORIZED, |
107 | 108 | OAuth2::TOKEN_TYPE_BEARER, |
108 | 109 | $this->serverService->getVariable(OAuth2::CONFIG_WWW_REALM), |
109 | 110 | 'access_denied', |
|
0 commit comments