Commit b7f287f2 authored by Josh Ji's avatar Josh Ji

add extension identifier "PRLab"

parent 1d4efe0f
...@@ -16,6 +16,8 @@ import com.webauthn4j.data.*; ...@@ -16,6 +16,8 @@ import com.webauthn4j.data.*;
import com.webauthn4j.data.attestation.statement.COSEAlgorithmIdentifier; import com.webauthn4j.data.attestation.statement.COSEAlgorithmIdentifier;
import com.webauthn4j.data.client.challenge.Challenge; import com.webauthn4j.data.client.challenge.Challenge;
import com.webauthn4j.data.client.challenge.DefaultChallenge; import com.webauthn4j.data.client.challenge.DefaultChallenge;
import com.webauthn4j.data.extension.client.AuthenticationExtensionsClientInputs;
import com.webauthn4j.data.extension.client.RegistrationExtensionClientInput;
import com.webauthn4j.util.Base64Util; import com.webauthn4j.util.Base64Util;
import com.webauthn4j.util.HexUtil; import com.webauthn4j.util.HexUtil;
import com.webauthn4j.validator.attestation.statement.AttestationStatementValidator; import com.webauthn4j.validator.attestation.statement.AttestationStatementValidator;
...@@ -65,6 +67,8 @@ public class MakeCredential { ...@@ -65,6 +67,8 @@ public class MakeCredential {
parameters.add(new PublicKeyCredentialParameters(PublicKeyCredentialType.PUBLIC_KEY, COSEAlgorithmIdentifier.RS256)); parameters.add(new PublicKeyCredentialParameters(PublicKeyCredentialType.PUBLIC_KEY, COSEAlgorithmIdentifier.RS256));
parameters.add(new PublicKeyCredentialParameters(PublicKeyCredentialType.PUBLIC_KEY, COSEAlgorithmIdentifier.ES256)); parameters.add(new PublicKeyCredentialParameters(PublicKeyCredentialType.PUBLIC_KEY, COSEAlgorithmIdentifier.ES256));
AuthenticationExtensionsClientInputs.BuilderForRegistration builderForRegistration = new AuthenticationExtensionsClientInputs.BuilderForRegistration();
AuthenticationExtensionsClientInputs<RegistrationExtensionClientInput> extensions = builderForRegistration.set("PRLab", Boolean.TRUE).build();
PublicKeyCredentialCreationOptions options = new PublicKeyCredentialCreationOptions( PublicKeyCredentialCreationOptions options = new PublicKeyCredentialCreationOptions(
...@@ -76,7 +80,7 @@ public class MakeCredential { ...@@ -76,7 +80,7 @@ public class MakeCredential {
null, null,
new AuthenticatorSelectionCriteria(attachment.equals("cross-platform")?AuthenticatorAttachment.CROSS_PLATFORM:AuthenticatorAttachment.PLATFORM,null,null,null), new AuthenticatorSelectionCriteria(attachment.equals("cross-platform")?AuthenticatorAttachment.CROSS_PLATFORM:AuthenticatorAttachment.PLATFORM,null,null,null),
conveyance.equals("direct")?AttestationConveyancePreference.DIRECT:AttestationConveyancePreference.NONE, conveyance.equals("direct")?AttestationConveyancePreference.DIRECT:AttestationConveyancePreference.NONE,
null); extensions);
logger.info("PublicKeyCredentialCreationOptions : {}", options); logger.info("PublicKeyCredentialCreationOptions : {}", options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment