java.lang.Object
org.ntnu.idi.idatt2106.sparesti.sparestibackend.model.Authenticator

@Entity public class Authenticator extends Object
Represents a registered authenticator for a user in a system that supports web authentication (WebAuthn). This entity stores the necessary details required to verify an authenticator's identity and to authenticate requests using WebAuthn protocol.

This class includes fields for storing the credential ID, public key, and other relevant data from the WebAuthn registration process. It is associated with a User entity representing the owner of the authenticator.

Author:
Y.A Marouga
  • Constructor Details

    • Authenticator

      public Authenticator(com.yubico.webauthn.RegistrationResult result, com.yubico.webauthn.data.AuthenticatorAttestationResponse response, User user, String name)
      Constructs a new Authenticator instance based on the WebAuthn registration result and the attestation response. This constructor extracts relevant data from the registration and attestation process to populate the entity.
      Parameters:
      result - The result of the registration process containing the credential ID, public key, and signature count.
      response - The attestation response containing details about the credential data.
      user - The user to whom this authenticator will be linked.
      name - The name to be given to this authenticator.