Package net.shibboleth.idp.plugin.authn.webauthn.storage.impl

# Class CredentialRegistrationSerializer

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.plugin.authn.webauthn.storage.impl.CredentialRegistrationSerializer

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `StorageSerializer<Set<CredentialRecord>>`

public class CredentialRegistrationSerializer extends AbstractInitializableComponent implements StorageSerializer<Set<CredentialRecord>>
Serialize the set of CredentialRecords to a JSON string.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final com.fasterxml.jackson.databind.ObjectMapper`
`jsonMapper`
The CBOR friendly json mapper.

## Constructor Summary

Constructors
Constructor
Description
`CredentialRegistrationSerializer()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Set<CredentialRecord>`
`deserialize(long version, String context, String key, String value, Long expiration)`
`String`
`serialize(Set<CredentialRecord> instance)`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### jsonMapper

private final com.fasterxml.jackson.databind.ObjectMapper jsonMapper
The CBOR friendly json mapper.

## Constructor Details

### CredentialRegistrationSerializer

public CredentialRegistrationSerializer()
Constructor.

## Method Details

### serialize

@Nonnull @NotEmpty public String serialize(Set<CredentialRecord> instance) throws IOException

Specified by:
  `serialize` in interface `StorageSerializer<Set<CredentialRecord>>`
Throws:
  `IOException`

### deserialize

@Nonnull @Unmodifiable @NotLive public Set<CredentialRecord> deserialize(long version, String context, String key, String value, Long expiration) throws IOException

Specified by:
  `deserialize` in interface `StorageSerializer<Set<CredentialRecord>>`
Throws:
  `IOException`