Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error reporting in OIDC extension #12374

Merged
merged 1 commit into from
Sep 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,15 @@ private TenantConfigContext createTenantContext(Vertx vertx, OidcTenantConfig oi
return createdTenantContextFromPublicKey(options, oidcConfig);
}

if (!oidcConfig.getAuthServerUrl().isPresent() || !oidcConfig.getClientId().isPresent()) {
if (!oidcConfig.getAuthServerUrl().isPresent()) {
throw new ConfigurationException(
"Both 'auth-server-url' and 'client-id' or alternatively 'public-key' must be configured"
"'auth-server-url' is not present. Both 'auth-server-url' and 'client-id' or alternatively 'public-key' must be configured"
+ " when the quarkus-oidc extension is enabled");
}

if (!oidcConfig.getClientId().isPresent()) {
throw new ConfigurationException(
"'client-id' is not present. Both 'auth-server-url' and 'client-id' or alternatively 'public-key' must be configured"
+ " when the quarkus-oidc extension is enabled");
}

Expand Down