Skip to content

Commit

Permalink
always use keycloak
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVHG committed Nov 18, 2024
1 parent 8c3022e commit b48983a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions app/ActionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ public function register(): void
$this->get(Auth0::class),
new Authentication(
[
'domain' => $this->parameter($this->getIdentityProvider() . '.domain'),
'clientId' => $this->parameter($this->getIdentityProvider() . '.client_id'),
'clientSecret' => $this->parameter($this->getIdentityProvider() . '.client_secret'),
'cookieSecret' => $this->parameter($this->getIdentityProvider() . '.cookie_secret'),
'domain' => $this->parameter('keycloak.domain'),
'clientId' => $this->parameter('keycloak.client_id'),
'clientSecret' => $this->parameter('keycloak.client_secret'),
'cookieSecret' => $this->parameter('keycloak.cookie_secret'),
]
),
$this->get(ResponseFactoryInterface::class),
new UriFactory(),
$this->parameter($this->getIdentityProvider() . '.log_out_uri'),
$this->parameter($this->getIdentityProvider() . '.client_id')
$this->parameter('keycloak.log_out_uri'),
$this->parameter('keycloak.client_id')
)
);

Expand All @@ -127,25 +127,25 @@ public function register(): void
RefreshServiceInterface::class,
fn (): RefreshAuth0Adapter => new RefreshAuth0Adapter(
new Client(),
$this->parameter($this->getIdentityProvider() . '.client_id'),
$this->parameter($this->getIdentityProvider() . '.client_secret'),
$this->parameter($this->getIdentityProvider() . '.domain')
$this->parameter('keycloak.client_id'),
$this->parameter('keycloak.client_secret'),
$this->parameter('keycloak.domain')
)
);

$this->addShared(
Auth0::class,
fn (): Auth0 => new Auth0(
[
'domain' => $this->parameter($this->getIdentityProvider() . '.domain'),
'clientId' => $this->parameter($this->getIdentityProvider() . '.client_id'),
'clientSecret' => $this->parameter($this->getIdentityProvider() . '.client_secret'),
'redirectUri' => $this->parameter($this->getIdentityProvider() . '.redirect_uri'),
'domain' => $this->parameter('keycloak.domain'),
'clientId' => $this->parameter('keycloak.client_id'),
'clientSecret' => $this->parameter('keycloak.client_secret'),
'redirectUri' => $this->parameter('keycloak.redirect_uri'),
'scope' => ['openid','email','profile','offline_access'],
'persistIdToken' => true,
'persistRefreshToken' => true,
'tokenLeeway' => $this->parameter($this->getIdentityProvider() . '.id_token_leeway'),
'cookieSecret' => $this->parameter($this->getIdentityProvider() . '.cookie_secret'),
'tokenLeeway' => $this->parameter('keycloak.id_token_leeway'),
'cookieSecret' => $this->parameter('keycloak.cookie_secret'),
]
)
);
Expand All @@ -154,7 +154,7 @@ public function register(): void
IsAllowedRefreshToken::class,
fn (): IsAllowedRefreshToken => new IsAllowedRefreshToken(
$this->get(ConsumerReadRepositoryInterface::class),
(string)$this->parameter($this->getIdentityProvider() . '.allowed_refresh_permission')
(string)$this->parameter('keycloak.allowed_refresh_permission')
)
);

Expand Down

0 comments on commit b48983a

Please sign in to comment.