Skip to content

Commit c5645c7

Browse files
committed
mdc logging fix
1 parent a71bfbc commit c5645c7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dsf-common/dsf-common-auth/src/main/java/dev/dsf/common/auth/logging/CurrentUserMdcLogger.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ protected void before(OrganizationIdentity organization)
4141
{
4242
before((Identity) organization);
4343

44-
organization.getCertificate().map(this::getThumbprint)
45-
.ifPresent(t -> MDC.pushByKey(DSF_ORGANIZATION_THUMBPRINT, t));
44+
organization.getCertificate().map(this::getThumbprint).ifPresent(t -> MDC.put(DSF_ORGANIZATION_THUMBPRINT, t));
4645
organization.getCertificate().map(X509Certificate::getSubjectX500Principal).map(X500Principal::getName)
4746
.ifPresent(d -> MDC.put(DSF_ORGANIZATION_DN, d));
4847

@@ -55,8 +54,7 @@ protected void before(PractitionerIdentity practitioner)
5554
{
5655
before((Identity) practitioner);
5756

58-
practitioner.getCertificate().map(this::getThumbprint)
59-
.ifPresent(t -> MDC.pushByKey(DSF_PRACTITIONER_THUMBPRINT, t));
57+
practitioner.getCertificate().map(this::getThumbprint).ifPresent(t -> MDC.put(DSF_PRACTITIONER_THUMBPRINT, t));
6058
practitioner.getCertificate().map(X509Certificate::getSubjectX500Principal).map(X500Principal::getName)
6159
.ifPresent(d -> MDC.put(DSF_PRACTITIONER_DN, d));
6260
practitioner.getCredentials().map(DsfOpenIdCredentials::getUserId)

0 commit comments

Comments
 (0)