Search in sources :

Example 1 with CollectedClientDataForm

use of com.webauthn4j.springframework.security.webauthn.sample.app.api.CollectedClientDataForm in project webauthn4j-spring-security by webauthn4j.

the class CollectedClientDataDeserializer method deserialize.

/**
 * {@inheritDoc}
 */
@Override
public CollectedClientDataForm deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
    String value = p.getValueAsString();
    CollectedClientDataForm result = new CollectedClientDataForm();
    result.setCollectedClientData(base64UrlStringToCollectedClientDataConverter.convert(value));
    result.setClientDataBase64(value);
    return result;
}
Also used : CollectedClientDataForm(com.webauthn4j.springframework.security.webauthn.sample.app.api.CollectedClientDataForm)

Example 2 with CollectedClientDataForm

use of com.webauthn4j.springframework.security.webauthn.sample.app.api.CollectedClientDataForm in project webauthn4j-spring-security by webauthn4j.

the class CollectedClientDataFormFormatter method parse.

@Override
public CollectedClientDataForm parse(String text, Locale locale) throws ParseException {
    CollectedClientData collectedClientData = base64UrlStringToCollectedClientDataConverter.convert(text);
    CollectedClientDataForm collectedClientDataForm = new CollectedClientDataForm();
    collectedClientDataForm.setCollectedClientData(collectedClientData);
    collectedClientDataForm.setClientDataBase64(text);
    return collectedClientDataForm;
}
Also used : CollectedClientData(com.webauthn4j.data.client.CollectedClientData) CollectedClientDataForm(com.webauthn4j.springframework.security.webauthn.sample.app.api.CollectedClientDataForm)

Aggregations

CollectedClientDataForm (com.webauthn4j.springframework.security.webauthn.sample.app.api.CollectedClientDataForm)2 CollectedClientData (com.webauthn4j.data.client.CollectedClientData)1