Class UnbindCertificateUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.x509.UnbindCertificateUseCase
Use case that unbinds a client certificate from an account and audits it. Like unlinking an identity, it refuses to
remove the last way to sign in, counted under the lock of
LockSignInMethodsUseCase so that concurrent
removals of the same account are serialized.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CertificateBindingRepositoryPort that stores the bindings.private final FederatedLinkingPolicyRules of removing a sign-in method.private final LockSignInMethodsUseCaseLocks and counts the sign-in methods of the account.private final RecordSecurityEventUseCaseUse case that records the audit events. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
certificateBindingRepository
Port that stores the bindings. -
lockSignInMethodsUseCase
Locks and counts the sign-in methods of the account. -
federatedLinkingPolicy
Rules of removing a sign-in method. -
recordSecurityEventUseCase
Use case that records the audit events.
-
-
Constructor Details
-
UnbindCertificateUseCase
public UnbindCertificateUseCase()
-
-
Method Details
-
execute
Unbinds a certificate; a certificate of another account is never touched.- Parameters:
userId- identifier of the account.username- name of the account, for the audit log.id- identifier of the binding.- Throws:
CertificateNotFoundException- if the account has no such binding.LastSignInMethodException- if the certificate is the last way the account can sign in.
-