Search in sources :

Example 1 with AuthenticatorTransport

use of com.webauthn4j.data.AuthenticatorTransport in project keycloak by keycloak.

the class WebAuthnRegister method showInfoAfterWebAuthnApiCreate.

private void showInfoAfterWebAuthnApiCreate(RegistrationData response) {
    AttestedCredentialData attestedCredentialData = response.getAttestationObject().getAuthenticatorData().getAttestedCredentialData();
    AttestationStatement attestationStatement = response.getAttestationObject().getAttestationStatement();
    Set<AuthenticatorTransport> transports = response.getTransports();
    logger.debugv("createad key's algorithm = {0}", String.valueOf(attestedCredentialData.getCOSEKey().getAlgorithm().getValue()));
    logger.debugv("aaguid = {0}", attestedCredentialData.getAaguid().toString());
    logger.debugv("attestation format = {0}", attestationStatement.getFormat());
    if (CollectionUtil.isNotEmpty(transports)) {
        logger.debugv("transports = [{0}]", transports.stream().map(AuthenticatorTransport::getValue).collect(Collectors.joining(",")));
    }
}
Also used : AttestedCredentialData(com.webauthn4j.data.attestation.authenticator.AttestedCredentialData) AttestationStatement(com.webauthn4j.data.attestation.statement.AttestationStatement) AuthenticatorTransport(com.webauthn4j.data.AuthenticatorTransport)

Aggregations

AuthenticatorTransport (com.webauthn4j.data.AuthenticatorTransport)1 AttestedCredentialData (com.webauthn4j.data.attestation.authenticator.AttestedCredentialData)1 AttestationStatement (com.webauthn4j.data.attestation.statement.AttestationStatement)1