Interface IUserProfileMfaDao

All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<UserProfileMfa, Long, IEntityContext>, IGenericDao<UserProfileMfa>
All Known Implementing Classes:
UserProfileMfaDao

public interface IUserProfileMfaDao extends IGenericDao<UserProfileMfa>
DAO for reading and writing UserProfileMfa entities.
Since:
8.0.0
Author:
XIMA Media GmbH
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Checks if the user profile MFA config can be persisted (create/update).
    Retrieves the UserProfileMfa for the given user profile ID.

    Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao

    all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update

    Methods inherited from interface IGenericDao

    count, createOrUpdate, findAll, findSingle, getEntityRefs, read
  • Method Details

    • assertUserProfileMfa

      void assertUserProfileMfa(IEntityContext ec, UserProfileMfa mfaConfig)
      Checks if the user profile MFA config can be persisted (create/update). If the state of the user profile MFA config does not allow persisting than a DatabaseAccessException will be thrown.
      Parameters:
      ec - entity context for accessing the database.
      mfaConfig - to check.
      Throws:
      de.xima.cmn.dao.exceptions.DatabaseAccessException - if the user profile MFA config can't be persisted.
    • getUserProfileMfa

      Optional<UserProfileMfa> getUserProfileMfa(IEntityContext ec, Long userProfileId)
      Retrieves the UserProfileMfa for the given user profile ID. If there is no MFA configuration for the user profile, an empty Optional is returned.

      The returned UserProfileMfa may not be verfied yet, so it is important to check if the MFA is verified before using it for authentication purposes. The verification state can be checked using the UserProfileMfa.isVerified() method.

      Parameters:
      ec - entity context for accessing the database.
      userProfileId - ID of the user profile to retrieve the MFA config for if it exists for the user profile.
      Returns:
      an Optional containing the UserProfileMfa if it exists, or an empty Optional if it does not.
      Throws:
      IllegalArgumentException - if the userProfileId is null or invalid.
      Since:
      8.4.0
      See Also: