-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
221 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
...ity-webauthn-quickstart/src/main/java/org/acme/security/webauthn/WebAuthnCertificate.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...y-webauthn-quickstart/src/test/java/org/acme/security/webauthn/test/TestUserProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.acme.security.webauthn.test; | ||
|
||
import org.acme.security.webauthn.MyWebAuthnSetup; | ||
import org.acme.security.webauthn.WebAuthnCredential; | ||
|
||
import io.quarkus.security.webauthn.WebAuthnCredentialRecord; | ||
import io.quarkus.test.Mock; | ||
import io.smallrye.mutiny.Uni; | ||
import jakarta.enterprise.context.ApplicationScoped; | ||
import jakarta.transaction.Transactional; | ||
|
||
@Mock | ||
@ApplicationScoped | ||
public class TestUserProvider extends MyWebAuthnSetup { | ||
@Transactional | ||
@Override | ||
public Uni<Void> store(WebAuthnCredentialRecord credentialRecord) { | ||
// this user is handled in the LoginResource endpoint manually | ||
if (credentialRecord.getUserName().equals("scooby")) { | ||
return Uni.createFrom().voidItem(); | ||
} | ||
return super.store(credentialRecord); | ||
} | ||
|
||
@Transactional | ||
@Override | ||
public Uni<Void> update(String credentialId, long counter) { | ||
WebAuthnCredential credential = WebAuthnCredential.findByCredentialId(credentialId); | ||
// this user is handled in the LoginResource endpoint manually | ||
if (credential.user.userName.equals("scooby")) { | ||
return Uni.createFrom().voidItem(); | ||
} | ||
return super.update(credentialId, counter); | ||
} | ||
|
||
} |
Oops, something went wrong.