Skip to content

Commit cb47baf

Browse files
committed
SecurityService: Token Exchange: Adjust messages
1 parent c8985e9 commit cb47baf

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/AasSecurity/SecurityService.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,16 +593,21 @@ private string HandleBearerToken(string? bearerToken, ref string user, ref bool
593593
bearerToken = "";
594594
jwtSecurityToken = null;
595595
doc = JsonDocument.Parse(content);
596-
if (doc.RootElement.TryGetProperty("access_token", out var tokenElement2))
596+
if (doc.RootElement.TryGetProperty("access_token", out var tokenElementFromLocalIdp))
597597
{
598-
bearerToken = tokenElement2.GetString();
598+
bearerToken = tokenElementFromLocalIdp.GetString();
599599
Console.WriteLine("token exchange 3 (with local idP) " + bearerToken);
600600
jwtSecurityToken = handler.ReadJwtToken(bearerToken);
601601

602602
issClaim = jwtSecurityToken.Claims.Where(c => c.Type == "iss");
603603

604604
iss = issClaim.First().Value;
605605
}
606+
else
607+
{
608+
Console.WriteLine($"Did not receive token in token exchange 3 response content: {content}");
609+
n
610+
}
606611
}
607612
}
608613
}

0 commit comments

Comments
 (0)