From 807014d7175f5e8976087dab6d96f32da6044897 Mon Sep 17 00:00:00 2001 From: Ronny Birkeli Date: Fri, 18 Aug 2023 12:54:39 +0200 Subject: [PATCH] Remove toLower call when adding org claim as this will fail if the username based org has uppercase characters somewhere. --- .../Authentication/Implementation/AuthenticationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/Authentication/Implementation/AuthenticationService.cs b/src/Services/Authentication/Implementation/AuthenticationService.cs index a1711ac4..a9f923c1 100644 --- a/src/Services/Authentication/Implementation/AuthenticationService.cs +++ b/src/Services/Authentication/Implementation/AuthenticationService.cs @@ -66,7 +66,7 @@ public async Task GenerateTokenForOrg(string org, string? orgNumber = nu List claims = new List(); string issuer = _generalSettings.Hostname; - claims.Add(new Claim(AltinnCoreClaimTypes.Org, org.ToLower(), ClaimValueTypes.String, issuer)); + claims.Add(new Claim(AltinnCoreClaimTypes.Org, org, ClaimValueTypes.String, issuer)); // 3 is the default level for altinn tokens form Maskinporten claims.Add(new Claim(AltinnCoreClaimTypes.AuthenticationLevel, "3", ClaimValueTypes.Integer32, issuer)); claims.Add(new Claim("urn:altinn:scope", "altinn:serviceowner/instances.read", ClaimValueTypes.String, issuer));