Skip to content

Commit

Permalink
Add null check for MDC values
Browse files Browse the repository at this point in the history
  • Loading branch information
Avarjana committed Jun 27, 2024
1 parent 8271038 commit 08360a5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,15 @@ protected AuthenticationResult doAuthenticate(MessageContext messageContext) {

if (serviceProviderName != null){
authenticationContext.addParameter(SERVICE_PROVIDER_NAME, serviceProviderName);
MDC.put(SERVICE_PROVIDER_NAME, serviceProviderName);
}
if (serviceProviderTenantDomain != null) {
authenticationContext.addParameter(SERVICE_PROVIDER_TENANT_DOMAIN, serviceProviderTenantDomain);
}
if (serviceProviderUUID != null) {
authenticationContext.addParameter(SERVICE_PROVIDER_UUID, serviceProviderUUID);
MDC.put(SERVICE_PROVIDER_UUID, serviceProviderUUID);
}

MDC.put(SERVICE_PROVIDER_NAME, serviceProviderName);
MDC.put(SERVICE_PROVIDER_UUID, serviceProviderUUID);
// Set OAuth service provider details to be consumed by the provisioning framework.
setProvisioningServiceProviderThreadLocal(oAuth2IntrospectionResponseDTO.getClientId(),
serviceProviderTenantDomain);
Expand Down

0 comments on commit 08360a5

Please sign in to comment.