Class DisableTotpUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.totp.DisableTotpUseCase
Use case that removes the authenticator app of a user together with the recovery codes that went with it. Every
trusted device of the user is revoked as well, since a device trusted to skip a second factor must not outlive it,
and the removal is audited.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RecordSecurityEventUseCaseUse case that records the audit events.private final RecoveryCodeRepositoryPort that stores the recovery codes.private final TotpCredentialRepositoryPort that stores the TOTP credentials.private final TrustedDeviceRepositoryPort that stores the trusted devices. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
totpCredentialRepository
Port that stores the TOTP credentials. -
recoveryCodeRepository
Port that stores the recovery codes. -
trustedDeviceRepository
Port that stores the trusted devices. -
recordSecurityEventUseCase
Use case that records the audit events.
-
-
Constructor Details
-
DisableTotpUseCase
public DisableTotpUseCase()
-
-
Method Details
-
execute
Disables TOTP.- Parameters:
userId- identifier of the user.username- name of the user, for the audit log.
-