Skip to content

Commit

Permalink
Merge pull request #278 from Avarjana/master
Browse files Browse the repository at this point in the history
Add null check for MDC values
  • Loading branch information
sadilchamishka authored Jun 27, 2024
2 parents 8271038 + 08360a5 commit b76d0ad
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 b76d0ad

Please sign in to comment.