Skip to content

Commit

Permalink
Merge pull request #1228 from cultuurnet/PPF-525/logout-url-fix
Browse files Browse the repository at this point in the history
PPF-525 Fix # for logout urls
  • Loading branch information
grubolsch authored Jun 28, 2024
2 parents 17a49d0 + bb81fec commit 22c1d49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Keycloak/Converters/IntegrationUrlConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ public static function buildLogoutUrls(Integration $integration, Environment $en
}

$logoutUrls = $integration->urlsForTypeAndEnvironment(IntegrationUrlType::Logout, $environment);
return implode('#', array_map(static fn ($url) => $url->url, $logoutUrls));
return implode('##', array_map(static fn ($url) => $url->url, $logoutUrls));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function test_combining_keycloak_convert_with_configured_uris(): void
$this->assertEquals([
'origin' => 'publiq-platform',
'use.refresh.tokens' => true,
'post.logout.redirect.uris' => 'https://example.com/logout1#https://example.com/logout2',
'post.logout.redirect.uris' => 'https://example.com/logout1##https://example.com/logout2',
], $convertedData['attributes']);
$this->assertEquals('https://example.com/login1', $convertedData['baseUrl']);
$this->assertEquals(['https://example.com/callback1', 'https://example.com/callback2'], $convertedData['redirectUris']);
Expand Down
2 changes: 1 addition & 1 deletion tests/Keycloak/Converters/IntegrationUrlConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function test_convert_for_first_party_logout_urls(): void
new IntegrationUrl(Uuid::uuid4(), $integration->id, Environment::Production, IntegrationUrlType::Logout, 'https://wrong.com/'),
);
$this->assertSame(
'https://example.com/logout1#https://example.com/logout2',
'https://example.com/logout1##https://example.com/logout2',
IntegrationUrlConverter::buildLogoutUrls($integration, $this->client->environment)
);
}
Expand Down

0 comments on commit 22c1d49

Please sign in to comment.