Class LockSignInMethodsUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.social.LockSignInMethodsUseCase
Use case that locks the sign-in methods of an account for the rest of the caller's transaction and counts them: a
password its owner knows (not a generated one), the linked identities, a passkey and the bound certificates. Every
use case that removes a sign-in method starts with it, so two concurrent removals of the same account are serialized
and the second one counts what the first left. It only runs inside the caller's transaction, which holds the lock.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CertificateBindingRepositoryPort that reads the bound certificates.private final FederatedIdentityRepositoryPort that stores the links.private final GeneratedPasswordRepositoryPort that remembers the accounts that only hold a generated password.private final PasskeyRepositoryPort that reads the passkeys.private final SignInMethodsLockPort that serializes the removals of an account. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLocks the sign-in methods of an account and counts them.
-
Field Details
-
signInMethodsLock
Port that serializes the removals of an account. -
federatedIdentityRepository
Port that stores the links. -
generatedPasswordRepository
Port that remembers the accounts that only hold a generated password. -
passkeyRepository
Port that reads the passkeys. -
certificateBindingRepository
Port that reads the bound certificates.
-
-
Constructor Details
-
LockSignInMethodsUseCase
public LockSignInMethodsUseCase()
-
-
Method Details
-
execute
Locks the sign-in methods of an account and counts them.- Parameters:
userId- identifier of the account.- Returns:
- the ways the account can sign in now, counted once the lock is held.
-