Search in sources :

Example 1 with MetadataBLOBPayload

use of com.webauthn4j.metadata.data.MetadataBLOBPayload in project webauthn4j by webauthn4j.

the class CachingMetadataBLOBProviderTest method createMetadataBLOB.

private MetadataBLOB createMetadataBLOB(LocalDate nextUpdate) {
    JWSFactory factory = new JWSFactory(new ObjectConverter());
    JWSHeader header = new JWSHeader(JWAIdentifier.ES256, null);
    MetadataBLOBPayload payload = new MetadataBLOBPayload("", 0, nextUpdate, Collections.emptyList());
    JWS<MetadataBLOBPayload> jws = factory.create(header, payload, new byte[32]);
    return new MetadataBLOB(jws);
}
Also used : ObjectConverter(com.webauthn4j.converter.util.ObjectConverter) MetadataBLOB(com.webauthn4j.metadata.data.MetadataBLOB) JWSFactory(com.webauthn4j.data.jws.JWSFactory) JWSHeader(com.webauthn4j.data.jws.JWSHeader) MetadataBLOBPayload(com.webauthn4j.metadata.data.MetadataBLOBPayload)

Aggregations

ObjectConverter (com.webauthn4j.converter.util.ObjectConverter)1 JWSFactory (com.webauthn4j.data.jws.JWSFactory)1 JWSHeader (com.webauthn4j.data.jws.JWSHeader)1 MetadataBLOB (com.webauthn4j.metadata.data.MetadataBLOB)1 MetadataBLOBPayload (com.webauthn4j.metadata.data.MetadataBLOBPayload)1