Skip to content
Snippets Groups Projects
Commit 3a0e46f0 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Rename from keycloack-bundle to auth-bundle

We want this bundle to work with all kind of OIDC servers in the future.

Fixes #2
parent 2652e799
No related branches found
No related tags found
No related merge requests found
Pipeline #57303 passed
Showing
with 40 additions and 39 deletions
......@@ -3,4 +3,5 @@
/.php_cs
/.*.cache
/_coverage
/.idea
\ No newline at end of file
/.idea
cghooks.lock
# DBP Relay Keycloak Bundle
# DBP Relay Auth Bundle
[GitLab](https://gitlab.tugraz.at/dbp/relay/dbp-relay-keycloak-bundle) | [Packagist](https://packagist.org/packages/dbp/relay-keycloak-bundle)
[GitLab](https://gitlab.tugraz.at/dbp/relay/dbp-relay-auth-bundle) | [Packagist](https://packagist.org/packages/dbp/relay-auth-bundle)
## Bundle Configuration
created via `./bin/console config:dump-reference DbpRelayKeycloakBundle | sed '/^$/d'`
created via `./bin/console config:dump-reference DbpRelayAuthBundle | sed '/^$/d'`
```yaml
# Default configuration for "DbpRelayKeycloakBundle"
dbp_relay_keycloak:
# Default configuration for "DbpRelayAuthBundle"
dbp_relay_auth:
# The Keycloak server URL
server_url: ~ # Example: 'https://keycloak.example.com/auth'
# The Keycloak Realm
......
{
"name": "dbp/relay-keycloak-bundle",
"name": "dbp/relay-auth-bundle",
"type": "symfony-bundle",
"license": "AGPL-3.0-or-later",
"require": {
......@@ -26,12 +26,12 @@
},
"autoload": {
"psr-4": {
"Dbp\\Relay\\KeycloakBundle\\": "src/"
"Dbp\\Relay\\AuthBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Dbp\\Relay\\KeycloakBundle\\Tests\\": "tests/"
"Dbp\\Relay\\AuthBundle\\Tests\\": "tests/"
}
},
"config": {
......
......@@ -13,7 +13,7 @@
<server name="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
<server name="SYMFONY_PHPUNIT_VERSION" value="9"/>
<server name="KERNEL_CLASS" value="Dbp\Relay\KeycloakBundle\Tests\Kernel"/>
<server name="KERNEL_CLASS" value="Dbp\Relay\AuthBundle\Tests\Kernel"/>
</php>
<testsuites>
<testsuite name="Project Test Suite">
......
......@@ -2,12 +2,12 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle;
namespace Dbp\Relay\AuthBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class DbpRelayKeycloakBundle extends Bundle
class DbpRelayAuthBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\DependencyInjection;
namespace Dbp\Relay\AuthBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
......@@ -11,7 +11,7 @@ class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('dbp_relay_keycloak');
$treeBuilder = new TreeBuilder('dbp_relay_auth');
$treeBuilder->getRootNode()
->children()
->scalarNode('server_url')
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\DependencyInjection;
namespace Dbp\Relay\AuthBundle\DependencyInjection;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Config\FileLocator;
......@@ -11,7 +11,7 @@ use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
class DbpRelayKeycloakExtension extends ConfigurableExtension implements PrependExtensionInterface
class DbpRelayAuthExtension extends ConfigurableExtension implements PrependExtensionInterface
{
public function loadInternal(array $mergedConfig, ContainerBuilder $container)
{
......@@ -25,7 +25,7 @@ class DbpRelayKeycloakExtension extends ConfigurableExtension implements Prepend
$certCacheDef->setArguments(['core-keycloak-cert', 60, '%kernel.cache_dir%/dbp/keycloak-keycloak-cert']);
$certCacheDef->addTag('cache.pool');
$definition = $container->getDefinition('Dbp\Relay\KeycloakBundle\Keycloak\KeycloakBearerUserProvider');
$definition = $container->getDefinition('Dbp\Relay\AuthBundle\Keycloak\KeycloakBearerUserProvider');
$definition->addMethodCall('setConfig', [$mergedConfig]);
$definition->addMethodCall('setCertCache', [$certCacheDef]);
}
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Helpers;
namespace Dbp\Relay\AuthBundle\Helpers;
use GuzzleHttp\MessageFormatter;
use GuzzleHttp\Middleware;
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Keycloak;
namespace Dbp\Relay\AuthBundle\Keycloak;
class Keycloak
{
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Keycloak;
namespace Dbp\Relay\AuthBundle\Keycloak;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Keycloak;
namespace Dbp\Relay\AuthBundle\Keycloak;
use Symfony\Component\Security\Core\User\UserInterface;
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Keycloak;
namespace Dbp\Relay\AuthBundle\Keycloak;
use Dbp\Relay\CoreBundle\API\UserSessionInterface;
use Psr\Cache\CacheItemPoolInterface;
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Keycloak;
namespace Dbp\Relay\AuthBundle\Keycloak;
use Symfony\Component\Security\Core\User\UserInterface;
......
......@@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Keycloak;
namespace Dbp\Relay\AuthBundle\Keycloak;
use Dbp\Relay\KeycloakBundle\Helpers\Tools;
use Dbp\Relay\AuthBundle\Helpers\Tools;
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use Jose\Component\Core\JWKSet;
......
......@@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Keycloak;
namespace Dbp\Relay\AuthBundle\Keycloak;
use Dbp\Relay\KeycloakBundle\Helpers\Tools;
use Dbp\Relay\AuthBundle\Helpers\Tools;
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Keycloak;
namespace Dbp\Relay\AuthBundle\Keycloak;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
......
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Keycloak;
namespace Dbp\Relay\AuthBundle\Keycloak;
class TokenValidationException extends \Exception
{
......
services:
Dbp\Relay\KeycloakBundle\Keycloak\KeycloakBearerAuthenticator:
Dbp\Relay\AuthBundle\Keycloak\KeycloakBearerAuthenticator:
autowire: true
autoconfigure: true
Dbp\Relay\KeycloakBundle\Keycloak\KeycloakBearerUserProvider:
Dbp\Relay\AuthBundle\Keycloak\KeycloakBearerUserProvider:
autowire: true
autoconfigure: true
Dbp\Relay\KeycloakBundle\Service\KeycloakUserSession:
Dbp\Relay\AuthBundle\Service\KeycloakUserSession:
autowire: true
autoconfigure: true
Dbp\Relay\KeycloakBundle\Keycloak\KeycloakBearerUserProviderInterface:
'@Dbp\Relay\KeycloakBundle\Keycloak\KeycloakBearerUserProvider'
Dbp\Relay\AuthBundle\Keycloak\KeycloakBearerUserProviderInterface:
'@Dbp\Relay\AuthBundle\Keycloak\KeycloakBearerUserProvider'
Dbp\Relay\CoreBundle\API\UserSessionInterface:
'@Dbp\Relay\KeycloakBundle\Service\KeycloakUserSession'
'@Dbp\Relay\AuthBundle\Service\KeycloakUserSession'
Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface:
'@Dbp\Relay\KeycloakBundle\Keycloak\KeycloakBearerAuthenticator'
'@Dbp\Relay\AuthBundle\Keycloak\KeycloakBearerAuthenticator'
......@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Service;
namespace Dbp\Relay\AuthBundle\Service;
use Dbp\Relay\CoreBundle\API\UserSessionInterface;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
......
......@@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Dbp\Relay\KeycloakBundle\Tests;
namespace Dbp\Relay\AuthBundle\Tests;
use Dbp\Relay\KeycloakBundle\Keycloak\KeycloakBearerUserProviderInterface;
use Dbp\Relay\AuthBundle\Keycloak\KeycloakBearerUserProviderInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\User\UserInterface;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment