Class FIDO2RegistrationHelper


  • public class FIDO2RegistrationHelper
    extends java.lang.Object
    Work with a users FIDO registrations. Example usage:
    
     var registrationHelper = new FIDO2RegistrationHelper();
    
     var registrations = registrationHelper.getRegistrationsByUsername(username);
    
     for(var i = 0; i < registrations; i++) {
      var registration = registrations[i];
      // Work with the registration
     }
     
    • Constructor Detail

      • FIDO2RegistrationHelper

        public FIDO2RegistrationHelper()
    • Method Detail

      • getRegistrationByCredId

        public FIDO2Registration getRegistrationByCredId​(java.lang.String credentialId)
                                                  throws Fido2PersistenceException
        Retrieve a registration for a given credential Id.
        Parameters:
        credentialId - as returned from the authenticator.
        Returns:
        the registration as native JSON.
        Throws:
        Fido2PersistenceException
      • getRegistrationsByUid

        public java.util.List<FIDO2Registration> getRegistrationsByUid​(java.lang.String rpId,
                                                                       java.lang.String uid)
                                                                throws Fido2PersistenceException
        Retrieve a registration for a given FIDO User Id.
        Parameters:
        Uid - as generated assigned to a user.
        Returns:
        the registration as native JSON.
        Throws:
        Fido2PersistenceException
      • getRegistrationsByUsername

        public java.util.List<FIDO2Registration> getRegistrationsByUsername​(java.lang.String username)
                                                                     throws Fido2PersistenceException
        get registrations for a given Verify Access username
        Parameters:
        username - of the registrations to lookup return array of registrations, as native JSON.
        Throws:
        Fido2PersistenceException
      • removeRegistration

        public boolean removeRegistration​(java.lang.String rpId,
                                          java.lang.String credentialId)
                                   throws Fido2PersistenceException
        Remove the registration for a particular credentialId
        Parameters:
        rpId - which the registration belonged to
        credentialId - to remove
        Returns:
        true: a registration was deleted / false : no registration deleted
        Throws:
        Fido2PersistenceException