Class FIDO2RegistrationHelper

java.lang.Object
com.tivoli.am.fim.fido.mediation.FIDO2RegistrationHelper

public class FIDO2RegistrationHelper extends Object
Work with a users FIDO registrations. Example usage:

 var registrationHelper = new FIDO2RegistrationHelper();

 var registrations = registrationHelper.getRegistrationsByUsername(username);

 for(var i = 0; i invalid input: '<' registrations; i++) {
  var registration = registrations[i];
  // Work with the registration
 }
 
  • Constructor Details

    • FIDO2RegistrationHelper

      public FIDO2RegistrationHelper()
  • Method Details

    • getRegistrationByCredId

      public FIDO2Registration getRegistrationByCredId(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 List<FIDO2Registration> getRegistrationsByUid(String rpId, 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 List<FIDO2Registration> getRegistrationsByUsername(String username) throws Fido2PersistenceException
      Get registrations for a given Verify Identity Access username
      Parameters:
      username - of the registrations to lookup return array of registrations, as native JSON.
      Throws:
      Fido2PersistenceException
    • removeRegistration

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

      public boolean removeRegistration(String credentialId) throws Fido2PersistenceException
      Remove the registration for a particular credentialId
      Parameters:
      credentialId - to remove
      Returns:
      true: a registration was deleted / false : no registration deleted
      Throws:
      Fido2PersistenceException
    • updateNickname

      public void updateNickname(String credentialId, String nickname) throws Fido2PersistenceException
      Method updates the friendly name for Registration referenced by the given credential ID.
      Parameters:
      credentialId - The credential ID for the Registration to update.
      nickname - The new friendly name.