Class AuthenticationPersistenceService

java.lang.Object
io.jans.fido2.service.persist.AuthenticationPersistenceService

@ApplicationScoped public class AuthenticationPersistenceService extends Object
Every authentication is persisted under Person Entry
Version:
May 08, 2020
Author:
Yuriy Movchan
  • Constructor Details

    • AuthenticationPersistenceService

      public AuthenticationPersistenceService()
  • Method Details

    • save

      public void save(io.jans.orm.model.fido2.Fido2AuthenticationData authenticationData)
    • save

      public void save(io.jans.orm.model.fido2.Fido2AuthenticationEntry authenticationEntity)
    • buildFido2AuthenticationEntry

      public io.jans.orm.model.fido2.Fido2AuthenticationEntry buildFido2AuthenticationEntry(io.jans.orm.model.fido2.Fido2AuthenticationData authenticationData)
    • update

      public void update(io.jans.orm.model.fido2.Fido2AuthenticationEntry authenticationEntity)
    • addBranch

      public void addBranch(String baseDn)
    • containsBranch

      public boolean containsBranch(String baseDn)
    • prepareBranch

      public void prepareBranch(String userInum)
    • findByChallenge

      public List<io.jans.orm.model.fido2.Fido2AuthenticationEntry> findByChallenge(String challenge)
    • getCeremonyBaseDns

      public List<String> getCeremonyBaseDns()
      The base DNs assertion ceremonies are stored under.

      Identified ceremonies live beneath the owning person entry, while conditional-UI ceremonies have no user to hang off and live under the assertion base DN instead. A sweep that visited only the first would miss precisely the ceremonies most likely to be abandoned.

    • findLapsedPendingCeremonies

      public List<io.jans.orm.model.fido2.Fido2AuthenticationEntry> findLapsedPendingCeremonies(String baseDn, Date lapsedBefore, int batchSize)
      Finds ceremonies still marked pending whose window has already elapsed.

      Filtering on status rather than on the expiry column is what makes the sweep idempotent: the transition only fires from pending, so a row already relabelled — by an earlier sweep, or by another node, or by a second pass over a base DN that resolves to the same table — is simply not matched again.

      Parameters:
      baseDn - the subtree to search
      lapsedBefore - ceremonies created at or before this instant have outlived their window
      batchSize - maximum number of entries to return
    • getDnForAuthenticationEntry

      public String getDnForAuthenticationEntry(String userInum, String jsId)
    • getBaseDnForFido2AuthenticationEntries

      public String getBaseDnForFido2AuthenticationEntries(String userInum)
    • getDnForUser

      public String getDnForUser(String userInum)