public final class AuthenticatorData
extends java.lang.Object
The authenticator data structure encodes contextual bindings made by the authenticator. These bindings are controlled by the authenticator itself, and derive their trust from the WebAuthn Relying Party's assessment of the security properties of the authenticator. In one extreme case, the authenticator may be embedded in the client, and its bindings may be no more trustworthy than the client data. At the other extreme, the authenticator may be a discrete entity with high-security hardware and software, connected to the client over a secure channel. In both cases, the Relying Party receives the authenticator data in the same format, and uses its knowledge of the authenticator to make trust decisions.
Constructor and Description |
---|
AuthenticatorData(@NonNull ByteArray bytes)
Decode an
AuthenticatorData object from a raw authenticator data byte array. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
@NonNull java.util.Optional<AttestedCredentialData> |
getAttestedCredentialData()
Attested credential data, if present.
|
@NonNull ByteArray |
getBytes()
The original raw byte array that this object is decoded from.
|
java.util.Optional<com.upokecenter.cbor.CBORObject> |
getExtensions()
Extension-defined authenticator data, if present.
|
@NonNull AuthenticatorDataFlags |
getFlags()
The flags bit field.
|
ByteArray |
getRpIdHash()
The SHA-256 hash of the RP ID the credential is scoped to.
|
long |
getSignatureCounter()
The 32-bit unsigned signature counter.
|
int |
hashCode() |
java.lang.String |
toString() |
public AuthenticatorData(@NonNull @NonNull ByteArray bytes)
AuthenticatorData
object from a raw authenticator data byte array.public ByteArray getRpIdHash()
public long getSignatureCounter()
public java.util.Optional<com.upokecenter.cbor.CBORObject> getExtensions()
This member is present if and only if the AuthenticatorDataFlags.ED
flag is set.
Changes to the returned value are not reflected in the AuthenticatorData
object.
flags
@NonNull public @NonNull ByteArray getBytes()
@NonNull public @NonNull AuthenticatorDataFlags getFlags()
@NonNull public @NonNull java.util.Optional<AttestedCredentialData> getAttestedCredentialData()
This member is present if and only if the AuthenticatorDataFlags.AT
flag is set.
flags
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object