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

# Class ImmutableCredentialRecord

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

All Implemented Interfaces:
  `CredentialRecord`

public final class ImmutableCredentialRecord extends Object implements CredentialRecord
An immutable `CredentialRecord`.

Since:
  6.4

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`ImmutableCredentialRecord.ImmutableCredentialRecordBuilder`

## Method Summary

Modifier and Type
Method
Description
`static ImmutableCredentialRecord.ImmutableCredentialRecordBuilder`
`builder()`
`static ImmutableCredentialRecord.ImmutableCredentialRecordBuilder`
`fromCredentialRecord(CredentialRecord credentialRecord)`
`Bytes`
`getAttestationClientDataJSON()`
The attestationClientDataJSON is the value of the attestationObject attribute when the public key credential source was registered.
`Bytes`
`getAttestationObject()`
The attestationObject is the value of the attestationObject attribute when the public key credential source was registered.
`Instant`
`getCreated()`
When this `CredentialRecord` was created.
`Bytes`
`getCredentialId()`
The credential.id.
`PublicKeyCredentialType`
`getCredentialType()`
The credential.type
`String`
`getLabel()`
A human-readable label for this `CredentialRecord` assigned by the user.
`Instant`
`getLastUsed()`
The last time this `CredentialRecord` was used.
`PublicKeyCose`
`getPublicKey()`
The publicKey
`long`
`getSignatureCount()`
The authData.signCount
`Set<AuthenticatorTransport>`
`getTransports()`
The transpots is the value returned from `response.getTransports()`.
`Bytes`
`getUserEntityUserId()`
A reference to the associated `PublicKeyCredentialUserEntity.getId()`
`boolean`
`isBackupEligible()`
The backupElgible flag is the same as the BE flag in authData.
`boolean`
`isBackupState()`
The backupState flag is the same as the BS flag in authData.
`boolean`
`isUvInitialized()`
uvInitialized is the value of the UV (user verified) flag in authData and indicates whether any credential from this public key credential source has had the UV flag set.

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

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

## Method Details

### getCredentialType

public PublicKeyCredentialType getCredentialType()
Description copied from interface: `CredentialRecord`
The credential.type

Specified by:
  `getCredentialType` in interface `CredentialRecord`
Returns:

### getCredentialId

public Bytes getCredentialId()
Description copied from interface: `CredentialRecord`
The credential.id.

Specified by:
  `getCredentialId` in interface `CredentialRecord`
Returns:

### getUserEntityUserId

public Bytes getUserEntityUserId()
Description copied from interface: `CredentialRecord`
A reference to the associated `PublicKeyCredentialUserEntity.getId()`

Specified by:
  `getUserEntityUserId` in interface `CredentialRecord`
Returns:

### getPublicKey

public PublicKeyCose getPublicKey()
Description copied from interface: `CredentialRecord`
The publicKey

Specified by:
  `getPublicKey` in interface `CredentialRecord`
Returns:

### getSignatureCount

public long getSignatureCount()
Description copied from interface: `CredentialRecord`
The authData.signCount

Specified by:
  `getSignatureCount` in interface `CredentialRecord`
Returns:

### isUvInitialized

public boolean isUvInitialized()
Description copied from interface: `CredentialRecord`
uvInitialized is the value of the UV (user verified) flag in authData and indicates whether any credential from this public key credential source has had the UV flag set.

Specified by:
  `isUvInitialized` in interface `CredentialRecord`
Returns:

### getTransports

public Set<AuthenticatorTransport> getTransports()
Description copied from interface: `CredentialRecord`
The transpots is the value returned from `response.getTransports()`.

Specified by:
  `getTransports` in interface `CredentialRecord`
Returns:

### isBackupEligible

public boolean isBackupEligible()
Description copied from interface: `CredentialRecord`
The backupElgible flag is the same as the BE flag in authData.

Specified by:
  `isBackupEligible` in interface `CredentialRecord`
Returns:

### isBackupState

public boolean isBackupState()
Description copied from interface: `CredentialRecord`
The backupState flag is the same as the BS flag in authData.

Specified by:
  `isBackupState` in interface `CredentialRecord`
Returns:

### getAttestationObject

public Bytes getAttestationObject()
Description copied from interface: `CredentialRecord`
The attestationObject is the value of the attestationObject attribute when the public key credential source was registered.

Specified by:
  `getAttestationObject` in interface `CredentialRecord`
Returns:
  the attestationObject

### getAttestationClientDataJSON

public Bytes getAttestationClientDataJSON()
Description copied from interface: `CredentialRecord`
The attestationClientDataJSON is the value of the attestationObject attribute when the public key credential source was registered.

Specified by:
  `getAttestationClientDataJSON` in interface `CredentialRecord`
Returns:

### getCreated

public Instant getCreated()
Description copied from interface: `CredentialRecord`
When this `CredentialRecord` was created.

Specified by:
  `getCreated` in interface `CredentialRecord`
Returns:
  When this `CredentialRecord` was created.

### getLastUsed

public Instant getLastUsed()
Description copied from interface: `CredentialRecord`
The last time this `CredentialRecord` was used.

Specified by:
  `getLastUsed` in interface `CredentialRecord`
Returns:
  the last time this `CredentialRecord` was used.

### getLabel

public String getLabel()
Description copied from interface: `CredentialRecord`
A human-readable label for this `CredentialRecord` assigned by the user.

Specified by:
  `getLabel` in interface `CredentialRecord`
Returns:
  a label

### builder

public static ImmutableCredentialRecord.ImmutableCredentialRecordBuilder builder()

### fromCredentialRecord

public static ImmutableCredentialRecord.ImmutableCredentialRecordBuilder fromCredentialRecord(CredentialRecord credentialRecord)