public interface Attestation
| Modifier and Type | Method and Description |
|---|---|
String |
fmt()
The unique identifier for the attestation
|
static byte[] |
hash(String algorithm,
byte[] data)
Returns SHA-256 digest of the given data.
|
static List<X509Certificate> |
parseX5c(JsonArray x5c)
Parses a JsonArray of certificates to a X509Certificate list
|
void |
validate(WebAuthnOptions options,
MetaData metadata,
byte[] clientDataJSON,
JsonObject attestation,
AuthData authData)
The implementation of the Attestation verification.
|
static void |
verifySignature(PublicKeyCredential publicKeyCredential,
X509Certificate certificate,
byte[] signature,
byte[] data)
Verify if the data provider matches the signature based of the given certificate.
|
String fmt()
void validate(WebAuthnOptions options, MetaData metadata, byte[] clientDataJSON, JsonObject attestation, AuthData authData) throws AttestationException
options - the runtime configuration optionsmetadata - the Metadata holder to perform MDS queriesclientDataJSON - the binary client data jsonattestation - the JSON representation of the attestationauthData - the authenticator dataAttestationException - if the validation failsstatic byte[] hash(String algorithm, byte[] data) throws AttestationException, NoSuchAlgorithmException
data - - data to hashAttestationExceptionNoSuchAlgorithmExceptionstatic void verifySignature(PublicKeyCredential publicKeyCredential, X509Certificate certificate, byte[] signature, byte[] data) throws AttestationException, InvalidKeyException, SignatureException, InvalidAlgorithmParameterException, NoSuchAlgorithmException
certificate - - origin certificatesignature - - received signaturedata - - data to verifyAttestationExceptionInvalidKeyExceptionSignatureExceptionInvalidAlgorithmParameterExceptionNoSuchAlgorithmExceptionstatic List<X509Certificate> parseX5c(JsonArray x5c) throws CertificateException
x5c - the json arrayCertificateExceptionCopyright © 2021. All rights reserved.