Class HasVerifiedPhoneUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.sms.HasVerifiedPhoneUseCase
- All Implemented Interfaces:
SecondFactorEnrolmentQuery
@Service
@Transactional(readOnly=true)
public class HasVerifiedPhoneUseCase
extends Object
implements SecondFactorEnrolmentQuery
Tells whether a user has a verified phone. As the enrolment query of the SMS second factor, a user with a verified
phone requires multi-factor authentication.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final UserPhoneRepositoryPort that reads the verified phones. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTells whether a user has a verified phone.booleanhasConfirmed(UUID userId) Tells whether a user has confirmed the SMS second factor.
-
Field Details
-
userPhoneRepository
Port that reads the verified phones.
-
-
Constructor Details
-
HasVerifiedPhoneUseCase
public HasVerifiedPhoneUseCase()
-
-
Method Details
-
execute
Tells whether a user has a verified phone.- Parameters:
userId- identifier of the user.- Returns:
truewhen a phone of the user is verified.
-
hasConfirmed
Tells whether a user has confirmed the SMS second factor.- Specified by:
hasConfirmedin interfaceSecondFactorEnrolmentQuery- Parameters:
userId- identifier of the user.- Returns:
- the same as
execute(UUID).
-