Package com.tivoli.am.fim.fido.mediation
Class FIDO2RegistrationHelper
java.lang.Object
com.tivoli.am.fim.fido.mediation.FIDO2RegistrationHelper
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRegistrationByCredId
(String credentialId) Retrieve a registration for a given credential Id.getRegistrationsByUid
(String rpId, String uid) Retrieve a registration for a given FIDO User Id.getRegistrationsByUsername
(String username) Get registrations for a given Verify Identity Access usernameboolean
removeRegistration
(String credentialId) Remove the registration for a particular credentialIdboolean
removeRegistration
(String rpId, String credentialId) Remove the registration for a particular credentialId and relying party ID.void
updateNickname
(String credentialId, String nickname) Method updates the friendly name for Registration referenced by the given credential ID.
-
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 tocredentialId
- to remove- Returns:
- true: a registration was deleted / false : no registration deleted
- Throws:
Fido2PersistenceException
-
removeRegistration
Remove the registration for a particular credentialId- Parameters:
credentialId
- to remove- Returns:
- true: a registration was deleted / false : no registration deleted
- Throws:
Fido2PersistenceException
-
updateNickname
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.
-