[java-idp-plugin-webauthn] branch main updated: Add credProps (Credential Properties) to registration request
Phil Smart
philip.smart at jisc.ac.uk
Fri Mar 15 17:29:54 UTC 2024
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch main
in repository java-idp-plugin-webauthn.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-webauthn.git;a=commit;h=b64e52fd22727c9c32938264d0cdc03b93588130
The following commit(s) were added to refs/heads/main by this push:
new b64e52f Add credProps (Credential Properties) to registration request
b64e52f is described below
commit b64e52fd22727c9c32938264d0cdc03b93588130
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Mar 15 17:29:49 2024 +0000
Add credProps (Credential Properties) to registration request
---
.../client/impl/YubicoWebAuthnAuthenticationClient.java | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebAuthnAuthenticationClient.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebAuthnAuthenticationClient.java
index ea934ed..ba0c48a 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebAuthnAuthenticationClient.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/client/impl/YubicoWebAuthnAuthenticationClient.java
@@ -39,6 +39,7 @@ import com.yubico.webauthn.data.PublicKeyCredential;
import com.yubico.webauthn.data.PublicKeyCredentialCreationOptions;
import com.yubico.webauthn.data.PublicKeyCredentialParameters;
import com.yubico.webauthn.data.PublicKeyCredentialRequestOptions;
+import com.yubico.webauthn.data.RegistrationExtensionInputs;
import com.yubico.webauthn.data.UserIdentity;
import com.yubico.webauthn.exception.RegistrationFailedException;
@@ -89,7 +90,7 @@ public class YubicoWebAuthnAuthenticationClient implements WebAuthnAuthenticatio
@Override
public PublicKeyCredentialRequestOptions createAuthenticationRequest(
@Nonnull final CredentialRequestOptionsParameters requestParams)
- throws WebAuthnAuthenticationClientException {
+ throws WebAuthnAuthenticationClientException {
final PublicKeyCredentialRequestOptions request = PublicKeyCredentialRequestOptions.builder()
.challenge(new ByteArray(requestParams.getChallenge()))
@@ -122,6 +123,9 @@ public class YubicoWebAuthnAuthenticationClient implements WebAuthnAuthenticatio
.id(new ByteArray(creationOptions.getUserId()))
.build();
+ // Request Credential Properties extension, allows knowledge if key is resident or passkey
+ final RegistrationExtensionInputs extensions = RegistrationExtensionInputs.builder().credProps().build();
+
final PublicKeyCredentialCreationOptions creation = PublicKeyCredentialCreationOptions.builder()
.rp(rp.getIdentity())
.user(identity)
@@ -134,14 +138,7 @@ public class YubicoWebAuthnAuthenticationClient implements WebAuthnAuthenticatio
.residentKey(creationOptions.getResidentKeyRequirement())
.authenticatorAttachment(creationOptions.getAuthenticatorAttachment())
.build())
-// .extensions(
-// startRegistrationOptions
-// .getExtensions()
-// .merge(
-// RegistrationExtensionInputs.builder()
-// .appidExclude(appId)
-// .credProps()
-// .build()))
+ .extensions(extensions)
.timeout(Optional.empty()).build();
if (creation == null) {
throw new WebAuthnAuthenticationClientException("Unable to build public key credential creation options");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list