Package org.springframework.security.web.webauthn.api

# Class PublicKeyCredentialDescriptor

java.lang.Object
org.springframework.security.web.webauthn.api.PublicKeyCredentialDescriptor

All Implemented Interfaces:
  `Serializable`

public final class PublicKeyCredentialDescriptor extends Object implements Serializable
PublicKeyCredentialDescriptor identifies a specific public key credential. It is used in create() to prevent creating duplicate credentials on the same authenticator, and in get() to determine if and how the credential can currently be reached by the client. It mirrors some fields of the PublicKeyCredential object returned by create() and get().

Since:
  6.4
See Also:
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`PublicKeyCredentialDescriptor.PublicKeyCredentialDescriptorBuilder`
Used to create `PublicKeyCredentialDescriptor`

## Method Summary

Modifier and Type
Method
Description
`static PublicKeyCredentialDescriptor.PublicKeyCredentialDescriptorBuilder`
`builder()`
Creates a new `PublicKeyCredentialDescriptor.PublicKeyCredentialDescriptorBuilder`
`Bytes`
`getId()`
The id property contains the credential ID of the public key credential the caller is referring to.
`Set<AuthenticatorTransport>`
`getTransports()`
The transports property is an OPTIONAL member that contains a hint as to how the client might communicate with the managing authenticator of the public key credential the caller is referring to.
`PublicKeyCredentialType`
`getType()`
The type property contains the type of the public key credential the caller is referring to.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getType

public PublicKeyCredentialType getType()
The type property contains the type of the public key credential the caller is referring to.

Returns:
  the type

### getId

public Bytes getId()
The id property contains the credential ID of the public key credential the caller is referring to.

Returns:
  the id

### getTransports

public Set<AuthenticatorTransport> getTransports()
The transports property is an OPTIONAL member that contains a hint as to how the client might communicate with the managing authenticator of the public key credential the caller is referring to.

Returns:
  the transports

### builder

public static PublicKeyCredentialDescriptor.PublicKeyCredentialDescriptorBuilder builder()
Creates a new `PublicKeyCredentialDescriptor.PublicKeyCredentialDescriptorBuilder`

Returns:
  a new `PublicKeyCredentialDescriptor.PublicKeyCredentialDescriptorBuilder`