use of com.webauthn4j.validator.RegistrationObject in project webauthn4j by webauthn4j.
the class NullAndroidSafetyNetAttestationStatementValidatorTest method validate_test.
@Test
void validate_test() {
RegistrationObject registrationObject = TestDataUtil.createRegistrationObjectWithAndroidSafetyNetAttestation();
target.validate(registrationObject);
}
use of com.webauthn4j.validator.RegistrationObject in project webauthn4j by webauthn4j.
the class NullAndroidSafetyNetAttestationStatementValidatorTest method validate_non_AndroidSafetyNetAttestation_test.
@Test
void validate_non_AndroidSafetyNetAttestation_test() {
RegistrationObject registrationObject = TestDataUtil.createRegistrationObjectWithTPMAttestation();
assertThrows(IllegalArgumentException.class, () -> target.validate(registrationObject));
}
use of com.webauthn4j.validator.RegistrationObject in project webauthn4j by webauthn4j.
the class AppleAnonymousAttestationStatementValidatorTest method validate_non_AppleAnonymousAttestation_test.
@Test
void validate_non_AppleAnonymousAttestation_test() {
RegistrationObject registrationObject = TestDataUtil.createRegistrationObjectWithTPMAttestation();
assertThrows(IllegalArgumentException.class, () -> target.validate(registrationObject));
}
use of com.webauthn4j.validator.RegistrationObject 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);
}
use of com.webauthn4j.validator.RegistrationObject in project webauthn4j by webauthn4j.
the class NullTPMAttestationStatementValidatorTest method validate_non_TPMAttestation_test.
@Test
void validate_non_TPMAttestation_test() {
RegistrationObject registrationObject = TestDataUtil.createRegistrationObjectWithAndroidKeyAttestation();
assertThrows(IllegalArgumentException.class, () -> target.validate(registrationObject));
}
Aggregations