Class LegacyPasskey

java.lang.Object
com.codename1.backend.security.migration.LegacyPasskey

public final class LegacyPasskey extends Object

A passkey as another relying party stored it.

What a WebAuthn library keeps is the same everywhere, under different column names: the credential id, the COSE public key the authenticator sent at registration, its signature counter, and the user handle -- the user.id the old server registered, which the authenticator returns with every assertion and which therefore cannot change.

A passkey moves only to a server of the same relying party id (the domain). One registered for old.example.com does not answer a challenge for new.example.com; that is WebAuthn, not this migration.

  • Constructor Details

    • LegacyPasskey

      public LegacyPasskey(String username, byte[] userHandle, byte[] credentialId, byte[] coseKey)
      Parameters:
      username - the local user it belongs to
      userHandle - the user.id it was registered with
      credentialId - its credential id
      coseKey - its public key, CBOR-encoded as the authenticator sent it
  • Method Details

    • signatureCount

      public LegacyPasskey signatureCount(long count)
    • transports

      public LegacyPasskey transports(List<String> transports)
    • label

      public LegacyPasskey label(String label)
    • backup

      public LegacyPasskey backup(boolean eligible, boolean state)
      The backup flags the old server recorded (synced passkeys are eligible).
    • uvInitialized

      public LegacyPasskey uvInitialized(boolean uvInitialized)