Search in sources :

Example 1 with DeviceCheckCBORModule

use of com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule in project webauthn4j by webauthn4j.

the class DeviceCheckManager method createObjectConverter.

/**
 * Create {@link ObjectConverter} instance with {@link DeviceCheckCBORModule}
 *
 * @return {@link ObjectConverter} instance with {@link DeviceCheckCBORModule}
 */
@NonNull
public static ObjectConverter createObjectConverter() {
    ObjectMapper jsonMapper = new ObjectMapper();
    ObjectMapper cborMapper = new ObjectMapper(new CBORFactory());
    cborMapper.registerModule(new DeviceCheckCBORModule());
    return new ObjectConverter(jsonMapper, cborMapper);
}
Also used : DeviceCheckCBORModule(com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule) CBORFactory(com.fasterxml.jackson.dataformat.cbor.CBORFactory) ObjectConverter(com.webauthn4j.converter.util.ObjectConverter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) NonNull(org.checkerframework.checker.nullness.qual.NonNull)

Example 2 with DeviceCheckCBORModule

use of com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule in project webauthn4j by webauthn4j.

the class DeviceCheckManager method createNonStrictDeviceCheckManager.

// ~ Factory methods
// ========================================================================================================
/**
 * Creates {@link DeviceCheckManager} with non strict configuration
 *
 * @return configured {@link DeviceCheckManager}
 */
@NonNull
public static DeviceCheckManager createNonStrictDeviceCheckManager() {
    ObjectMapper jsonMapper = new ObjectMapper();
    ObjectMapper cborMapper = new ObjectMapper(new CBORFactory());
    cborMapper.registerModule(new DeviceCheckCBORModule());
    ObjectConverter objectConverter = new ObjectConverter(jsonMapper, cborMapper);
    return createNonStrictDeviceCheckManager(objectConverter);
}
Also used : DeviceCheckCBORModule(com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule) CBORFactory(com.fasterxml.jackson.dataformat.cbor.CBORFactory) ObjectConverter(com.webauthn4j.converter.util.ObjectConverter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) NonNull(org.checkerframework.checker.nullness.qual.NonNull)

Example 3 with DeviceCheckCBORModule

use of com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule in project webauthn4j by webauthn4j.

the class DCAttestationDataTest method createObjectConverter.

private static ObjectConverter createObjectConverter() {
    ObjectMapper jsonMapper = new ObjectMapper();
    ObjectMapper cborMapper = new ObjectMapper(new CBORFactory());
    cborMapper.registerModule(new DeviceCheckCBORModule());
    return new ObjectConverter(jsonMapper, cborMapper);
}
Also used : DeviceCheckCBORModule(com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule) CBORFactory(com.fasterxml.jackson.dataformat.cbor.CBORFactory) AttestationObjectConverter(com.webauthn4j.converter.AttestationObjectConverter) ObjectConverter(com.webauthn4j.converter.util.ObjectConverter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 4 with DeviceCheckCBORModule

use of com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule in project webauthn4j by webauthn4j.

the class DCRegistrationObjectTest method createObjectConverter.

private static ObjectConverter createObjectConverter() {
    ObjectMapper jsonMapper = new ObjectMapper();
    ObjectMapper cborMapper = new ObjectMapper(new CBORFactory());
    cborMapper.registerModule(new DeviceCheckCBORModule());
    return new ObjectConverter(jsonMapper, cborMapper);
}
Also used : DeviceCheckCBORModule(com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule) CBORFactory(com.fasterxml.jackson.dataformat.cbor.CBORFactory) AttestationObjectConverter(com.webauthn4j.converter.AttestationObjectConverter) ObjectConverter(com.webauthn4j.converter.util.ObjectConverter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 5 with DeviceCheckCBORModule

use of com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule in project webauthn4j by webauthn4j.

the class AppleAppAttestAttestationStatementValidatorTest method createObjectConverter.

private ObjectConverter createObjectConverter() {
    ObjectMapper jsonMapper = new ObjectMapper();
    ObjectMapper cborMapper = new ObjectMapper(new CBORFactory());
    cborMapper.registerModule(new DeviceCheckCBORModule());
    return new ObjectConverter(jsonMapper, cborMapper);
}
Also used : DeviceCheckCBORModule(com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule) CBORFactory(com.fasterxml.jackson.dataformat.cbor.CBORFactory) AttestationObjectConverter(com.webauthn4j.converter.AttestationObjectConverter) ObjectConverter(com.webauthn4j.converter.util.ObjectConverter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 CBORFactory (com.fasterxml.jackson.dataformat.cbor.CBORFactory)5 DeviceCheckCBORModule (com.webauthn4j.appattest.converter.jackson.DeviceCheckCBORModule)5 ObjectConverter (com.webauthn4j.converter.util.ObjectConverter)5 AttestationObjectConverter (com.webauthn4j.converter.AttestationObjectConverter)3 NonNull (org.checkerframework.checker.nullness.qual.NonNull)2