Skip to content

Commit eb9d1c1

Browse files
committed
Fix decoding of a single role claim.
1 parent 5be439a commit eb9d1c1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Authentication/Authentication/Helpers/JwtHelpers.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ internal static string Decode(string jwToken)
2929
if (jwtHandler.CanReadToken(jwToken))
3030
{
3131
JwtSecurityToken token = jwtHandler.ReadJwtToken(jwToken);
32-
JwtPayload jwtPayload = new JwtPayload(token.Claims);
33-
return jwtPayload.SerializeToJson();
32+
return token.Payload.SerializeToJson();
3433
} else {
3534
return null;
3635
}

src/Authentication/Authentication/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"profiles": {
33
"Graph.Authentication": {
44
"commandName": "Executable",
5-
"executablePath": "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe",
5+
"executablePath": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
66
"commandLineArgs": "-NoProfile -NoExit"
77
}
88
}

0 commit comments

Comments
 (0)