Interface SecondFactorEnrolmentQuery

All Known Implementing Classes:
HasConfirmedPasskeyUseCase, HasVerifiedPhoneUseCase, IsTotpEnabledUseCase

public interface SecondFactorEnrolmentQuery
Extension point that tells whether a user has confirmed one kind of second factor. Every second factor declares one bean of this type (TOTP does it with its IsTotpEnabledUseCase); HasConfirmedSecondFactorUseCase asks all of them, so a user who has confirmed any second factor is always asked for one at sign-in and must step up before removing it, without this package knowing the factors.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tells whether a user has confirmed this second factor.
  • Method Details

    • hasConfirmed

      boolean hasConfirmed(UUID userId)
      Tells whether a user has confirmed this second factor.
      Parameters:
      userId - identifier of the user.
      Returns:
      true when the user has it and its enrolment is confirmed.