PublicKeyCredentialDescriptor

  • The PublicKeyCredentialDescriptor class contains attributes used when referring to a credential as an input for registration or authentication.

  • It implements the Parcelable interface.

  • An exception is thrown for unsupported or unrecognized public key credential descriptors.

  • The class has constructors for creating a descriptor with type, ID, and transports, accepting the ID as either a byte array or ByteString.

  • Key methods allow getting the ID, transports, and type of the credential descriptor.

public class PublicKeyCredentialDescriptor extends Object
implements Parcelable

This class contains the attributes that are specified by a caller when referring to a credential as an input parameter to the registration or authentication method.

See WebAuthn PublicKeyCredentialDescriptor definition

Nested Class Summary

class PublicKeyCredentialDescriptor.UnsupportedPubKeyCredDescriptorException Exception thrown when an unsupported or unrecognized public key credential descriptor is encountered. 

Inherited Constant Summary

Public Constructor Summary

PublicKeyCredentialDescriptor(String type, byte[] id, List<Transport> transports)
PublicKeyCredentialDescriptor(String type, ByteString id, List<Transport> transports)

Public Method Summary

boolean
byte[]
ByteString
List<Transport>
PublicKeyCredentialType
String
int
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Public Constructors

public PublicKeyCredentialDescriptor (String type, byte[] id, List<Transport> transports)

public PublicKeyCredentialDescriptor (String type, ByteString id, List<Transport> transports)

Public Methods

public boolean equals (Object obj)

public byte[] getId ()

public ByteString getIdAsByteString ()

public List<Transport> getTransports ()

public PublicKeyCredentialType getType ()

public String getTypeAsString ()

public int hashCode ()

public void writeToParcel (Parcel dest, int flags)