PublicKeyCredential

public class PublicKeyCredential extends Object
implements Parcelable

This class is contains the attributes that are returned to the caller when a new credential is created, or a new assertion is requested.

See WebAuthn PublicKeyCredential interface definition

Nested Class Summary

class PublicKeyCredential.Builder Builder for PublicKeyCredential

Inherited Constant Summary

Public Method Summary

static PublicKeyCredential
deserializeFromBytes(byte[] serializedBytes)
De-serializes the PublicKeyCredential from bytes, reversing serializeToBytes().
boolean
String
getAuthenticatorAttachment()
Returns the authenticator attachment of this credential.
AuthenticationExtensionsClientOutputs
String
getId()
Returns the id for the credential.
byte[]
getRawId()
Returns the rawId for the credential.
ByteString
getRawIdAsByteString()
Returns the rawId for the credential as a ByteString.
AuthenticatorResponse
String
int
byte[]
serializeToBytes()
Serializes the PublicKeyCredential to bytes.
String
toJson()
Returns the JSON representation of the object.
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Public Methods

public static PublicKeyCredential deserializeFromBytes (byte[] serializedBytes)

De-serializes the PublicKeyCredential from bytes, reversing serializeToBytes().

Returns

public boolean equals (Object obj)

public String getAuthenticatorAttachment ()

Returns the authenticator attachment of this credential.

public AuthenticationExtensionsClientOutputs getClientExtensionResults ()

public String getId ()

Returns the id for the credential.

This method will return null if and only if the response is an instance of AuthenticatorErrorResponse. AuthenticatorAttestationResponse and AuthenticatorAssertionResponse will always return a non-null id.

public byte[] getRawId ()

Returns the rawId for the credential.

This method will return null if and only if the response is an instance of AuthenticatorErrorResponse. AuthenticatorAttestationResponse and AuthenticatorAssertionResponse will always return a non-null rawId.

public ByteString getRawIdAsByteString ()

Returns the rawId for the credential as a ByteString.

This method will return null if and only if the response is an instance of AuthenticatorErrorResponse. AuthenticatorAttestationResponse and AuthenticatorAssertionResponse will always return a non-null rawId.

public AuthenticatorResponse getResponse ()

public String getType ()

public int hashCode ()

public byte[] serializeToBytes ()

Serializes the PublicKeyCredential to bytes. Use deserializeFromBytes(byte[]) to deserialize.

Returns
  • the serialized byte array.

public String toJson ()

Returns the JSON representation of the object.

public void writeToParcel (Parcel dest, int flags)