diff --git a/security-webauthn-quickstart/src/main/java/org/acme/security/webauthn/MyWebAuthnSetup.java b/security-webauthn-quickstart/src/main/java/org/acme/security/webauthn/MyWebAuthnSetup.java index 50d99cdcd6..0fb749ff3a 100644 --- a/security-webauthn-quickstart/src/main/java/org/acme/security/webauthn/MyWebAuthnSetup.java +++ b/security-webauthn-quickstart/src/main/java/org/acme/security/webauthn/MyWebAuthnSetup.java @@ -34,6 +34,10 @@ public Uni> findWebAuthnCredentialsByCredID(String credID) { @ReactiveTransactional @Override public Uni updateOrStoreWebAuthnCredentials(Authenticator authenticator) { + // leave the scooby user to the manual endpoint, because if we do it here it will be + // created/udated twice + if(authenticator.getUserName().equals("scooby")) + return Uni.createFrom().nullItem(); return User.findByUserName(authenticator.getUserName()) .flatMap(user -> { // new user diff --git a/security-webauthn-quickstart/src/test/java/org/acme/security/webauthn/test/NativeWebAuthnResourceIT.java b/security-webauthn-quickstart/src/test/java/org/acme/security/webauthn/test/NativeWebAuthnResourceIT.java index f35818262d..abe58d8723 100644 --- a/security-webauthn-quickstart/src/test/java/org/acme/security/webauthn/test/NativeWebAuthnResourceIT.java +++ b/security-webauthn-quickstart/src/test/java/org/acme/security/webauthn/test/NativeWebAuthnResourceIT.java @@ -1,8 +1,8 @@ package org.acme.security.webauthn.test; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeWebAuthnResourceIT extends WebAuthnResourceTest { // Execute the same tests but in native mode. diff --git a/security-webauthn-quickstart/src/test/java/org/acme/security/webauthn/test/TestUserProvider.java b/security-webauthn-quickstart/src/test/java/org/acme/security/webauthn/test/TestUserProvider.java deleted file mode 100644 index e48d8a9764..0000000000 --- a/security-webauthn-quickstart/src/test/java/org/acme/security/webauthn/test/TestUserProvider.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.acme.security.webauthn.test; - -import javax.enterprise.context.ApplicationScoped; - -import org.acme.security.webauthn.MyWebAuthnSetup; - -import io.quarkus.test.Mock; -import io.smallrye.mutiny.Uni; -import io.vertx.ext.auth.webauthn.Authenticator; - -@Mock -@ApplicationScoped -public class TestUserProvider extends MyWebAuthnSetup { - @Override - public Uni updateOrStoreWebAuthnCredentials(Authenticator authenticator) { - // delegate the scooby user to the manual endpoint, because if we do it here it will be - // created/udated twice - if(authenticator.getUserName().equals("scooby")) - return Uni.createFrom().nullItem(); - return super.updateOrStoreWebAuthnCredentials(authenticator); - } -}