-
-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
31 additions
and
214 deletions.
There are no files selected for viewing
57 changes: 0 additions & 57 deletions
57
src/DependencyInjection/CompilerPass/RefreshOAuthTokenCompilerPass.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,12 @@ | |
namespace HWI\Bundle\OAuthBundle; | ||
|
||
use HWI\Bundle\OAuthBundle\DependencyInjection\CompilerPass\EnableRefreshOAuthTokenListenerCompilerPass; | ||
use HWI\Bundle\OAuthBundle\DependencyInjection\CompilerPass\RefreshOAuthTokenCompilerPass; | ||
use HWI\Bundle\OAuthBundle\DependencyInjection\CompilerPass\ResourceOwnerCompilerPass; | ||
use HWI\Bundle\OAuthBundle\DependencyInjection\Security\Factory\OAuthAuthenticatorFactory; | ||
use HWI\Bundle\OAuthBundle\DependencyInjection\Security\Factory\OAuthFactory; | ||
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; | ||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface; | ||
|
||
/** | ||
* @author Geoffrey Bachelet <[email protected]> | ||
|
@@ -37,19 +34,7 @@ public function build(ContainerBuilder $container) | |
|
||
/** @var SecurityExtension $extension */ | ||
$extension = $container->getExtension('security'); | ||
|
||
$firewallNames = $this->extension->getFirewallNames(); | ||
|
||
if (method_exists($extension, 'addAuthenticatorFactory')) { | ||
$extension->addAuthenticatorFactory(new OAuthAuthenticatorFactory($firewallNames)); | ||
} elseif (interface_exists(AuthenticationProviderInterface::class)) { | ||
// @phpstan-ignore-next-line Symfony 4.4 BC layer | ||
$extension->addSecurityListenerFactory(new OAuthFactory($firewallNames)); | ||
$container->addCompilerPass(new RefreshOAuthTokenCompilerPass()); | ||
} else { | ||
// @phpstan-ignore-next-line Symfony < 5.4 BC layer | ||
$extension->addSecurityListenerFactory(new OAuthAuthenticatorFactory($firewallNames)); | ||
} | ||
$extension->addAuthenticatorFactory(new OAuthAuthenticatorFactory($this->extension->getFirewallNames())); | ||
|
||
$container->addCompilerPass(new ResourceOwnerCompilerPass()); | ||
$container->addCompilerPass(new EnableRefreshOAuthTokenListenerCompilerPass()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
src/Security/Http/Firewall/RefreshAccessTokenListenerOld.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.