Class ResolveCertificateLoginUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.x509.ResolveCertificateLoginUseCase
Use case that resolves a client certificate, presented over TLS or by a trusted proxy, to the account it is bound
to. The certificate is recognised by its SHA-256 fingerprint only. Whether the certificate is valid (signed by a
trusted authority, not expired) is decided before, by the TLS layer, never here.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CertificateBindingRepositoryPort that stores the bindings.private static final PatternShape of a fingerprint: 64 lower case hexadecimal digits.private final UserAccountRepositoryPort that stores the accounts. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFinds the account a certificate is bound to.
-
Field Details
-
FINGERPRINT
Shape of a fingerprint: 64 lower case hexadecimal digits. -
certificateBindingRepository
Port that stores the bindings. -
userAccountRepository
Port that stores the accounts.
-
-
Constructor Details
-
ResolveCertificateLoginUseCase
public ResolveCertificateLoginUseCase()
-
-
Method Details
-
execute
Finds the account a certificate is bound to.- Parameters:
fingerprintSha256- SHA-256 fingerprint of the certificate, as lower case hexadecimal digits.- Returns:
- the account, or an empty optional when the fingerprint is malformed or not bound to any account.
-