Skip to content

Commit a0faced

Browse files
authored
Merge pull request #10239 from sberyozkin/oidc_site_url_trailing_slash
Strip trailing forward slash from OIDC URL
2 parents 9b23f6e + 9bc79b1 commit a0faced

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/OidcRecorder.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ private TenantConfigContext createTenantContext(Vertx vertx, OidcTenantConfig oi
104104
}
105105

106106
// Base IDP server URL
107-
options.setSite(oidcConfig.getAuthServerUrl().get());
107+
String authServerUrl = oidcConfig.getAuthServerUrl().get();
108+
if (authServerUrl.endsWith("/")) {
109+
authServerUrl = authServerUrl.substring(0, authServerUrl.length() - 1);
110+
}
111+
options.setSite(authServerUrl);
108112
// RFC7662 introspection service address
109113
if (oidcConfig.getIntrospectionPath().isPresent()) {
110114
options.setIntrospectionPath(oidcConfig.getIntrospectionPath().get());

integration-tests/oidc/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration file
2-
quarkus.oidc.auth-server-url=${keycloak.ssl.url}/realms/quarkus
2+
quarkus.oidc.auth-server-url=${keycloak.ssl.url}/realms/quarkus/
33
quarkus.oidc.client-id=quarkus-app
44
quarkus.oidc.token.principal-claim=email
55
quarkus.http.cors=true

0 commit comments

Comments
 (0)