diff --git a/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/OidcAuthenticationMechanism.java b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/OidcAuthenticationMechanism.java index f3ec0c4282125..1fdcbe9a24649 100644 --- a/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/OidcAuthenticationMechanism.java +++ b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/OidcAuthenticationMechanism.java @@ -9,6 +9,7 @@ import io.quarkus.oidc.OIDCException; import io.quarkus.oidc.OidcTenantConfig; +import io.quarkus.oidc.common.runtime.OidcConstants; import io.quarkus.security.identity.IdentityProviderManager; import io.quarkus.security.identity.SecurityIdentity; import io.quarkus.security.identity.request.AuthenticationRequest; @@ -79,6 +80,6 @@ public Set> getCredentialTypes() { public HttpCredentialTransport getCredentialTransport() { //not 100% correct, but enough for now //if OIDC is present we don't really want another bearer mechanism - return new HttpCredentialTransport(HttpCredentialTransport.Type.AUTHORIZATION, "bearer"); + return new HttpCredentialTransport(HttpCredentialTransport.Type.AUTHORIZATION, OidcConstants.BEARER_SCHEME); } } diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpCredentialTransport.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpCredentialTransport.java index 935f19193e9ef..cd3ba29798c9a 100644 --- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpCredentialTransport.java +++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpCredentialTransport.java @@ -26,7 +26,7 @@ public HttpCredentialTransport(Type transportType, String typeTarget) { public HttpCredentialTransport(Type transportType, String typeTarget, String authenticationScheme) { this.transportType = Objects.requireNonNull(transportType); this.typeTarget = Objects.requireNonNull(typeTarget).toLowerCase(); - this.authenticationScheme = Objects.requireNonNull(authenticationScheme); + this.authenticationScheme = Objects.requireNonNull(authenticationScheme).toLowerCase(); } public enum Type {