4 Commits

Author SHA1 Message Date
El. Abdellah
87909a1c15 Update README.md 2022-03-06 19:36:11 +01:00
El. Abdellah
f254ab52ac Merge pull request #6 from el-abdel/develop
Add compatibility with Symfony V6
2022-03-06 19:34:25 +01:00
el-abdel
570008ab6e fix compatibility 2022-03-06 18:49:47 +01:00
abdel
1f88ce8cb0 add compatibility with sf6 2022-03-06 18:28:33 +01:00
6 changed files with 10 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ namespace ABEL\Bundle\keycloakBearerOnlyAdapterBundle;
use ABEL\Bundle\keycloakBearerOnlyAdapterBundle\DependencyInjection\ABELkeycloakBearerOnlyAdapterExtension;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class ABELkeycloakBearerOnlyAdapterBundle extends Bundle
@@ -12,7 +13,7 @@ class ABELkeycloakBearerOnlyAdapterBundle extends Bundle
/**
* @return ExtensionInterface|null
*/
public function getContainerExtension()
public function getContainerExtension(): ?ExtensionInterface
{
if (null === $this->extension) {
$this->extension = new ABELkeycloakBearerOnlyAdapterExtension();

View File

@@ -27,7 +27,7 @@ class ABELkeycloakBearerOnlyAdapterExtension extends Extension
$definition->replaceArgument(4, $config['ssl_verification']);
}
public function getAlias()
public function getAlias(): string
{
return 'abel_keycloak_bearer_only_adapter';
}

View File

@@ -103,3 +103,4 @@ To configure keycloak to work with this bundle, [here](./Resources/docs/keycloak
| V1.0.1 | >=4.0.0 <5.0.0 |
| V1.1.* (uses old authentication systeme with guard) | >=5.0.0 <6.0.0 |
| V1.2.* (uses new authentication systeme) | >=5.3.0 <6.0.0 |
| V1.3.* | =6.0.* |

View File

@@ -202,7 +202,7 @@ class KeycloakBearerUser implements UserInterface, \Serializable
*
* @return array (Role|string)[] The user roles
*/
public function getRoles()
public function getRoles(): array
{
return $this->roles;
}

View File

@@ -100,7 +100,7 @@ class KeycloakBearerUserProvider implements UserProviderInterface{
'base_uri' => $this->issuer,
]);
$response = $client->post('/realms/'.$this->realm.'/protocol/openid-connect/token/introspect', [
$response = $client->post('/auth/realms/'.$this->realm.'/protocol/openid-connect/token/introspect', [
'auth' => [$this->client_id, $this->client_secret],
'form_params' => [
'token' => $accessToken,

View File

@@ -12,10 +12,10 @@
"minimum-stability": "stable",
"require": {
"php": ">=7.2.5",
"symfony/config": "^5.3",
"symfony/dependency-injection": "^5.3",
"symfony/http-kernel": "^5.3",
"symfony/security-bundle": "^5.3",
"symfony/config": "^6.0",
"symfony/dependency-injection": "^6.0",
"symfony/http-kernel": "^6.0",
"symfony/security-bundle": "^6.0",
"guzzlehttp/guzzle": "^6.3",
"ext-json": "*"
},