All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.webauthn4j.metadata.util.internal.MetadataStatementUtil Maven / Gradle / Ivy

There is a newer version: 0.9.2.RELEASE
Show newest version
package com.webauthn4j.metadata.util.internal;

import com.webauthn4j.data.AuthenticatorAttestationType;
import com.webauthn4j.metadata.data.statement.MetadataStatement;

public class MetadataStatementUtil {

    private MetadataStatementUtil(){}

    public static boolean checkSurrogateMetadataStatementAttestationRootCertificate(MetadataStatement metadataStatement) {
        boolean isSurrogate = metadataStatement != null && metadataStatement.getAttestationTypes().stream().allMatch(type -> type.equals(AuthenticatorAttestationType.BASIC_SURROGATE));

        if (isSurrogate) {
            return metadataStatement.getAttestationRootCertificates().isEmpty();
        }
        return true;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy