Class DeletePasskeyUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.passkeys.DeletePasskeyUseCase
Use case that deletes a passkey of a user and audits the removal. When that leaves the user without any confirmed
second factor, every trusted device of the user is revoked too, as disabling TOTP does: a remembered browser stands
in for a second factor the user no longer has.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HasConfirmedSecondFactorUseCaseUse case telling whether the user still has a confirmed second factor.private final PasskeyRepositoryPort that stores the passkeys.private final RecordSecurityEventUseCaseUse case that records the audit events.private final TrustedDeviceRepositoryPort that stores the trusted devices. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
passkeyRepository
Port that stores the passkeys. -
hasConfirmedSecondFactorUseCase
Use case telling whether the user still has a confirmed second factor. -
trustedDeviceRepository
Port that stores the trusted devices. -
recordSecurityEventUseCase
Use case that records the audit events.
-
-
Constructor Details
-
DeletePasskeyUseCase
public DeletePasskeyUseCase()
-
-
Method Details
-
execute
Deletes a passkey; a passkey of another account is never touched.- Parameters:
userId- identifier of the signed-in user, for the audit log.username- name of the signed-in account.id- credential identifier.- Throws:
PasskeyNotFoundException- if the account has no passkey with that identifier.
-