Class HasConfirmedPasskeyUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.passkeys.HasConfirmedPasskeyUseCase
- All Implemented Interfaces:
SecondFactorEnrolmentQuery
@Service
@Transactional(readOnly=true)
public class HasConfirmedPasskeyUseCase
extends Object
implements SecondFactorEnrolmentQuery
Use case that tells whether a user has registered a passkey. It is also the passkey
SecondFactorEnrolmentQuery: a passkey is registered only by a signed-in user and verified by the browser
before it is stored, so a registered passkey is always confirmed, and it makes the second factor required.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTells whether a user has at least one passkey.booleanhasConfirmed(UUID userId) Tells whether a user has confirmed the passkey second factor.
-
Field Details
-
passkeyRepository
Port that reads the passkeys.
-
-
Constructor Details
-
HasConfirmedPasskeyUseCase
public HasConfirmedPasskeyUseCase()
-
-
Method Details
-
execute
Tells whether a user has at least one passkey.- Parameters:
userId- identifier of the user.- Returns:
truewhen the user has registered a passkey.
-
hasConfirmed
Tells whether a user has confirmed the passkey second factor.- Specified by:
hasConfirmedin interfaceSecondFactorEnrolmentQuery- Parameters:
userId- identifier of the user.- Returns:
- the same as
execute(UUID).
-