use of com.webauthn4j.data.extension.client.AuthenticationExtensionsClientOutputs in project webauthn4j by webauthn4j.
the class TestDataUtil method createCoreRegistrationObjectWithAppleAppAttestAttestation.
public static CoreRegistrationObject createCoreRegistrationObjectWithAppleAppAttestAttestation() {
// Key ID: "eTAkPnbDrHW+v17P3CrBvb4gPKLxpSxvsnyVTFXVq+w="
byte[] collectedClientDataBytes = Base64UrlUtil.decode("eyJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjgwODAiLCJjaGFsbGVuZ2UiOiJkM1Z5ZW1Wc2NHWnliM0JtIiwidHlwZSI6IndlYmF1dGhuLmNyZWF0ZSJ9");
byte[] clientDataHash = MessageDigestUtil.createSHA256().digest(collectedClientDataBytes);
byte[] attestationObjectBytes = Base64UrlUtil.decode("o2NmbXRvYXBwbGUtYXBwYXR0ZXN0Z2F0dFN0bXSiY3g1Y4JZAvYwggLyMIICeaADAgECAgYBc_5ZDswwCgYIKoZIzj0EAwIwTzEjMCEGA1UEAwwaQXBwbGUgQXBwIEF0dGVzdGF0aW9uIENBIDExEzARBgNVBAoMCkFwcGxlIEluYy4xEzARBgNVBAgMCkNhbGlmb3JuaWEwHhcNMjAwODE3MjEyNTE2WhcNMjAwODE4MjEzNTE2WjCBkTFJMEcGA1UEAwxANTQ0ZTk0ODEwNTA5MTNlOThjMzRiYzg5MmM5ZjI1Y2NmMGM4YmQ0NjA3YTdmNjdkZGUzMjE2MDA4ZDk5MTU3YjEaMBgGA1UECwwRQUFBIENlcnRpZmljYXRpb24xEzARBgNVBAoMCkFwcGxlIEluYy4xEzARBgNVBAgMCkNhbGlmb3JuaWEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAR3d82Uh2zHPFbH86C-5P3SNOg37xIM0bRuqoz0uSTkSFboZc99_wFlXW0MZKruzD0UAHWmg9KyBk4Q0vlhJ0CTo4H9MIH6MAwGA1UdEwEB_wQCMAAwDgYDVR0PAQH_BAQDAgTwMIGJBgkqhkiG92NkCAUEfDB6pAMC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1dGhEYXRhWKQ55G_XcFes9vC8TnMMtLn-dO2k9aSdIb2vEJj7jXeszEAAAAAAYXBwYXR0ZXN0ZGV2ZWxvcAAgVE6UgQUJE-mMNLyJLJ8lzPDIvUYHp_Z93jIWAI2ZFXulAQIDJiABIVggd3fNlIdsxzxWx_OgvuT90jToN-8SDNG0bqqM9Lkk5EgiWCBW6GXPff8BZV1tDGSq7sw9FAB1poPSsgZOENL5YSdAkw");
AttestationObject attestationObject = attestationObjectConverter.convert(attestationObjectBytes);
Set<AuthenticatorTransport> transports = Collections.emptySet();
AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> authenticationExtensionsClientOutputs = new AuthenticationExtensionsClientOutputs<>();
Instant timestamp = Instant.parse("2020-08-18T13:37:00");
return new CoreRegistrationObject(attestationObject, attestationObjectBytes, clientDataHash, TestDataUtil.createServerProperty(), timestamp);
}
use of com.webauthn4j.data.extension.client.AuthenticationExtensionsClientOutputs in project webauthn4j by webauthn4j.
the class TestDataUtil method createRegistrationObjectWithAndroidKeyAttestation.
public static RegistrationObject createRegistrationObjectWithAndroidKeyAttestation() {
byte[] collectedClientDataBytes = Base64UrlUtil.decode("eyJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjgwODAiLCJjaGFsbGVuZ2UiOiJ2MmgxYzJWeWJtRnRaWFEwYVY5T2JUUm9iakZEZUVrd1NHYzNPSGh6VFdsamFHRnNiR1Z1WjJWUXR1YkVEQzRPU3BHSGViSExMTmVyRmY4IiwidHlwZSI6IndlYmF1dGhuLmNyZWF0ZSJ9");
CollectedClientData collectedClientData = collectedClientDataConverter.convert(collectedClientDataBytes);
byte[] attestationObjectBytes = Base64UrlUtil.decode("o2NmbXRrYW5kcm9pZC1rZXlnYXR0U3RtdKNjYWxnJmNzaWdYSDBGAiEAl0EDZokwnDApmVkWnSc24ELfZCI-Fx3s7K6YLM-W-xACIQCHvO-RPrqBSVV8rHYlWvRUt-UXpwRc4NQPBnVZ6k9CGGN4NWOCWQMEM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CFUc_hJJZGdtSu9ThnEb74K6NZC3U-KbwgpQECAyYgASFYICw4xPmHIvquDRz2KUzyyQlZFhZMbi-mc_YylL1o55jPIlggGQI5ESYAOfR8QM6quTQSoyhjZET806A3yOoCUe2AWJE");
AttestationObject attestationObject = attestationObjectConverter.convert(attestationObjectBytes);
Set<AuthenticatorTransport> transports = Collections.emptySet();
AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> authenticationExtensionsClientOutputs = new AuthenticationExtensionsClientOutputs<>();
return new RegistrationObject(attestationObject, attestationObjectBytes, collectedClientData, collectedClientDataBytes, authenticationExtensionsClientOutputs, transports, TestDataUtil.createServerProperty());
}
use of com.webauthn4j.data.extension.client.AuthenticationExtensionsClientOutputs in project webauthn4j by webauthn4j.
the class TestDataUtil method createRegistrationObjectWithAndroidSafetyNetAttestation.
public static RegistrationObject createRegistrationObjectWithAndroidSafetyNetAttestation() {
byte[] collectedClientDataBytes = Base64UrlUtil.decode("eyJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjgwODAiLCJjaGFsbGVuZ2UiOiJ2MmgxYzJWeWJtRnRaWFF5TFRKTWNGaEhNV2hXWm14V1RYbGxjSE40YzJsamFHRnNiR1Z1WjJWUXByUl9fSkRUUUotY2JZN3NYb1R4RFA4IiwidHlwZSI6IndlYmF1dGhuLmNyZWF0ZSJ9");
CollectedClientData collectedClientData = collectedClientDataConverter.convert(collectedClientDataBytes);
byte[] attestationObjectBytes = Base64UrlUtil.decode("o2NmbXRxYW5kcm9pZC1zYWZldHluZXRnYXR0U3RtdKJjdmVyaDEyNjg1MDIzaHJlc3BvbnNlWRWVZXlKaGJHY2lPaUpTVXpJMU5pSXNJbmcxWXlJNld5Sk5TVWxHVUVSRFEwSkRVMmRCZDBsQ1FXZEpVRUpPV1RWWldFZFJNRVY0VTNWbVMwWlViRXROVFVFd1IwTlRjVWRUU1dJelJGRkZRa04zVlVGTlJ6UjRRM3BCU2tKblRsWkNRVmxVUVd4V1ZFMVRjM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VaSewHECwWCklEpl3kfHW2umFfvGSaifZWkYWIigZwDlV1aKGbuiXswDpqHX59QVHqjNGrSGtid_Nbu48xb8Cc4sUBkfFRTExKsCUEN-Xfbezx8tELtEd9AVKQVxaCLf30DN61C_hBNew_3oEt0hHeCPlYfzkkVYDRIjMf8Ud7phpBJM_vfEoz30xsXuoZFWhwhskicjtcHRI5Hyvz7z4korABDz6sYlELblzH2v7F-74Rt0u1Hw76cQ4X0BQxgtelwS5pbV_I8wdYReti5HLwgT0eH9zBbtWNC51sn00x8KDEhQwEAAQ");
AttestationObject attestationObject = attestationObjectConverter.convert(attestationObjectBytes);
Set<AuthenticatorTransport> transports = Collections.emptySet();
AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> authenticationExtensionsClientOutputs = new AuthenticationExtensionsClientOutputs<>();
Instant timestamp = Instant.parse("2019-02-02T07:01:00.00Z");
return new RegistrationObject(attestationObject, attestationObjectBytes, collectedClientData, collectedClientDataBytes, authenticationExtensionsClientOutputs, transports, TestDataUtil.createServerProperty(), timestamp);
}
use of com.webauthn4j.data.extension.client.AuthenticationExtensionsClientOutputs in project webauthn4j by webauthn4j.
the class TestDataUtil method createRegistrationObjectWithPackedAttestation.
// ~ Registration Object
// ========================================================================================================
public static RegistrationObject createRegistrationObjectWithPackedAttestation() {
CollectedClientData collectedClientData = TestDataUtil.createClientData(ClientDataType.WEBAUTHN_CREATE);
byte[] collectedClientDataBytes = collectedClientDataConverter.convertToBytes(collectedClientData);
byte[] clientDataHash = MessageDigestUtil.createSHA256().digest(collectedClientDataBytes);
AttestationObject attestationObject = createAttestationObjectWithBasicPackedECAttestationStatement(clientDataHash);
byte[] attestationObjectBytes = attestationObjectConverter.convertToBytes(attestationObject);
Set<AuthenticatorTransport> transports = Collections.emptySet();
AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> authenticationExtensionsClientOutputs = new AuthenticationExtensionsClientOutputs<>();
return new RegistrationObject(attestationObject, attestationObjectBytes, collectedClientData, collectedClientDataBytes, authenticationExtensionsClientOutputs, transports, TestDataUtil.createServerProperty());
}
use of com.webauthn4j.data.extension.client.AuthenticationExtensionsClientOutputs in project webauthn4j by webauthn4j.
the class PackedAttestationStatementValidatorTest method validate.
private void validate(byte[] clientDataBytes, AttestationObject attestationObject) {
byte[] attestationObjectBytes = new AttestationObjectConverter(objectConverter).convertToBytes(attestationObject);
Origin origin = new Origin(originUrl);
Challenge challenge = (Challenge) () -> Base64UrlUtil.decode(challengeString);
CollectedClientData collectedClientData = new CollectedClientDataConverter(objectConverter).convert(clientDataBytes);
Set<AuthenticatorTransport> transports = Collections.emptySet();
AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput> authenticationExtensionsClientOutputs = new AuthenticationExtensionsClientOutputs<>();
RegistrationObject registrationObject = new RegistrationObject(attestationObject, attestationObjectBytes, collectedClientData, clientDataBytes, authenticationExtensionsClientOutputs, transports, new ServerProperty(origin, rpId, challenge, tokenBindingId));
target.validate(registrationObject);
}
Aggregations