@@ -16,10 +16,10 @@ |
||
16 | 16 | use OAuth2Framework\ServerBundle\Security\Authentication\Provider\OAuth2Provider; |
17 | 17 | use OAuth2Framework\ServerBundle\Security\EntryPoint\OAuth2EntryPoint; |
18 | 18 | use OAuth2Framework\ServerBundle\Security\Firewall\OAuth2Listener; |
19 | +use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface; |
|
19 | 20 | use Symfony\Component\DependencyInjection\ChildDefinition; |
20 | 21 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
21 | 22 | use Symfony\Component\DependencyInjection\Reference; |
22 | -use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface; |
|
23 | 23 | use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
24 | 24 | |
25 | 25 | class OAuth2SecurityFactory implements SecurityFactoryInterface |
@@ -13,9 +13,9 @@ |
||
13 | 13 | |
14 | 14 | namespace OAuth2Framework\ServerBundle\Tests\TestBundle\Service; |
15 | 15 | |
16 | +use OAuth2Framework\Component\Core\UserAccount\UserAccountRepository; |
|
16 | 17 | use OAuth2Framework\ServerBundle\Tests\TestBundle\Entity\User; |
17 | 18 | use OAuth2Framework\ServerBundle\Tests\TestBundle\Entity\UserRepository; |
18 | -use OAuth2Framework\Component\Core\UserAccount\UserAccountRepository; |
|
19 | 19 | use Symfony\Component\Security\Core\Exception\UnsupportedUserException; |
20 | 20 | use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; |
21 | 21 | use Symfony\Component\Security\Core\User\UserInterface; |
@@ -13,16 +13,16 @@ |
||
13 | 13 | |
14 | 14 | namespace OAuth2Framework\Component\AuthorizationEndpoint; |
15 | 15 | |
16 | -use OAuth2Framework\Component\AuthorizationEndpoint\ParameterChecker\ParameterCheckerManager; |
|
17 | -use OAuth2Framework\Component\AuthorizationEndpoint\UserAccount\UserAccountCheckerManager; |
|
18 | -use Psr\Http\Server\RequestHandlerInterface; |
|
19 | -use Psr\Http\Server\MiddlewareInterface; |
|
20 | 16 | use OAuth2Framework\Component\AuthorizationEndpoint\ConsentScreen\ExtensionManager; |
21 | 17 | use OAuth2Framework\Component\AuthorizationEndpoint\Exception\OAuth2AuthorizationException; |
18 | +use OAuth2Framework\Component\AuthorizationEndpoint\ParameterChecker\ParameterCheckerManager; |
|
19 | +use OAuth2Framework\Component\AuthorizationEndpoint\UserAccount\UserAccountCheckerManager; |
|
22 | 20 | use OAuth2Framework\Component\AuthorizationEndpoint\UserAccount\UserAccountDiscovery; |
23 | 21 | use OAuth2Framework\Component\Core\Exception\OAuth2Exception; |
24 | 22 | use Psr\Http\Message\ResponseInterface; |
25 | 23 | use Psr\Http\Message\ServerRequestInterface; |
24 | +use Psr\Http\Server\MiddlewareInterface; |
|
25 | +use Psr\Http\Server\RequestHandlerInterface; |
|
26 | 26 | |
27 | 27 | abstract class AuthorizationEndpoint implements MiddlewareInterface |
28 | 28 | { |
@@ -14,17 +14,17 @@ |
||
14 | 14 | namespace OAuth2Framework\ServerBundle\Controller; |
15 | 15 | |
16 | 16 | use Http\Message\MessageFactory; |
17 | -use OAuth2Framework\Component\AuthorizationEndpoint\ParameterChecker\ParameterCheckerManager; |
|
18 | -use OAuth2Framework\Component\AuthorizationEndpoint\UserAccount\UserAccountCheckerManager; |
|
19 | -use OAuth2Framework\ServerBundle\Form\FormFactory; |
|
20 | -use OAuth2Framework\ServerBundle\Form\Handler\AuthorizationFormHandler; |
|
21 | -use OAuth2Framework\ServerBundle\Form\Model\AuthorizationModel; |
|
22 | 17 | use OAuth2Framework\Component\AuthorizationEndpoint\Authorization; |
23 | 18 | use OAuth2Framework\Component\AuthorizationEndpoint\AuthorizationEndpoint; |
24 | 19 | use OAuth2Framework\Component\AuthorizationEndpoint\AuthorizationRequestLoader; |
25 | 20 | use OAuth2Framework\Component\AuthorizationEndpoint\ConsentScreen\ExtensionManager; |
26 | 21 | use OAuth2Framework\Component\AuthorizationEndpoint\Exception\ProcessAuthorizationException; |
22 | +use OAuth2Framework\Component\AuthorizationEndpoint\ParameterChecker\ParameterCheckerManager; |
|
23 | +use OAuth2Framework\Component\AuthorizationEndpoint\UserAccount\UserAccountCheckerManager; |
|
27 | 24 | use OAuth2Framework\Component\AuthorizationEndpoint\UserAccount\UserAccountDiscovery; |
25 | +use OAuth2Framework\ServerBundle\Form\FormFactory; |
|
26 | +use OAuth2Framework\ServerBundle\Form\Handler\AuthorizationFormHandler; |
|
27 | +use OAuth2Framework\ServerBundle\Form\Model\AuthorizationModel; |
|
28 | 28 | use Psr\Http\Message\ResponseInterface; |
29 | 29 | use Psr\Http\Message\ServerRequestInterface; |
30 | 30 | use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; |
@@ -25,6 +25,7 @@ |
||
25 | 25 | * @throws Exception\ProcessAuthorizationException |
26 | 26 | * @throws Exception\RedirectToLoginPageException |
27 | 27 | * @throws Exception\ShowConsentScreenException |
28 | + * @return void |
|
28 | 29 | */ |
29 | 30 | public function check(Authorization $authorization); |
30 | 31 | } |
@@ -21,10 +21,10 @@ |
||
21 | 21 | use OAuth2Framework\Component\Core\Client\Client; |
22 | 22 | use OAuth2Framework\Component\Core\Client\ClientId; |
23 | 23 | use OAuth2Framework\Component\Core\DataBag\DataBag; |
24 | +use OAuth2Framework\Component\Core\TokenType\TokenType; |
|
24 | 25 | use OAuth2Framework\Component\Core\UserAccount\UserAccount; |
25 | 26 | use OAuth2Framework\Component\Core\UserAccount\UserAccountId; |
26 | 27 | use OAuth2Framework\Component\ImplicitGrant\TokenResponseType; |
27 | -use OAuth2Framework\Component\Core\TokenType\TokenType; |
|
28 | 28 | use PHPUnit\Framework\TestCase; |
29 | 29 | use Prophecy\Argument; |
30 | 30 |
@@ -26,15 +26,15 @@ |
||
26 | 26 | use Jose\Component\Signature\JWSVerifier; |
27 | 27 | use Jose\Component\Signature\Serializer\CompactSerializer as JwsCompactSerializer; |
28 | 28 | use OAuth2Framework\Component\Core\Client\Client; |
29 | -use OAuth2Framework\Component\TokenEndpoint\GrantTypeData; |
|
30 | 29 | use OAuth2Framework\Component\Core\Client\ClientId; |
31 | 30 | use OAuth2Framework\Component\Core\Client\ClientRepository; |
31 | +use OAuth2Framework\Component\Core\Exception\OAuth2Exception; |
|
32 | 32 | use OAuth2Framework\Component\Core\ResourceOwner\ResourceOwnerId; |
33 | +use OAuth2Framework\Component\Core\TrustedIssuer\TrustedIssuerRepository; |
|
33 | 34 | use OAuth2Framework\Component\Core\UserAccount\UserAccountId; |
34 | 35 | use OAuth2Framework\Component\Core\UserAccount\UserAccountRepository; |
35 | -use OAuth2Framework\Component\Core\Exception\OAuth2Exception; |
|
36 | 36 | use OAuth2Framework\Component\TokenEndpoint\GrantType; |
37 | -use OAuth2Framework\Component\Core\TrustedIssuer\TrustedIssuerRepository; |
|
37 | +use OAuth2Framework\Component\TokenEndpoint\GrantTypeData; |
|
38 | 38 | use Psr\Http\Message\ServerRequestInterface; |
39 | 39 | |
40 | 40 | class JwtBearerGrantType implements GrantType |
@@ -13,14 +13,14 @@ |
||
13 | 13 | |
14 | 14 | namespace OAuth2Framework\Component\Middleware; |
15 | 15 | |
16 | -use Psr\Http\Server\RequestHandlerInterface; |
|
17 | -use Psr\Http\Server\MiddlewareInterface; |
|
18 | 16 | use OAuth2Framework\Component\Core\AccessToken\AccessTokenId; |
19 | 17 | use OAuth2Framework\Component\Core\AccessToken\AccessTokenRepository; |
20 | 18 | use OAuth2Framework\Component\Core\Exception\OAuth2Exception; |
21 | 19 | use OAuth2Framework\Component\Core\TokenType\TokenTypeManager; |
22 | 20 | use Psr\Http\Message\ResponseInterface; |
23 | 21 | use Psr\Http\Message\ServerRequestInterface; |
22 | +use Psr\Http\Server\MiddlewareInterface; |
|
23 | +use Psr\Http\Server\RequestHandlerInterface; |
|
24 | 24 | |
25 | 25 | class AccessTokenMiddleware implements MiddlewareInterface |
26 | 26 | { |
@@ -13,8 +13,6 @@ discard block |
||
13 | 13 | |
14 | 14 | namespace OAuth2Framework\Component\Middleware; |
15 | 15 | |
16 | -use Psr\Http\Server\RequestHandlerInterface; |
|
17 | -use Psr\Http\Server\MiddlewareInterface; |
|
18 | 16 | use OAuth2Framework\Component\Core\AccessToken\AccessToken; |
19 | 17 | use OAuth2Framework\Component\Core\AccessToken\AccessTokenHandlerManager; |
20 | 18 | use OAuth2Framework\Component\Core\AccessToken\AccessTokenId; |
@@ -23,6 +21,8 @@ discard block |
||
23 | 21 | use OAuth2Framework\Component\Core\TokenType\TokenTypeManager; |
24 | 22 | use Psr\Http\Message\ResponseInterface; |
25 | 23 | use Psr\Http\Message\ServerRequestInterface; |
24 | +use Psr\Http\Server\MiddlewareInterface; |
|
25 | +use Psr\Http\Server\RequestHandlerInterface; |
|
26 | 26 | |
27 | 27 | class OAuth2SecurityMiddleware implements MiddlewareInterface |
28 | 28 | { |