File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
src/Microsoft.IdentityModel.JsonWebTokens Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -604,19 +604,17 @@ public IEnumerable<string> Audiences
604
604
lock ( _audiencesLock )
605
605
{
606
606
if ( _audiences == null )
607
-
608
- _audiences = new List < string > ( ) ;
609
-
610
607
if ( Payload . TryGetValue ( JwtRegisteredClaimNames . Aud , out JsonElement audiences ) )
611
608
{
612
- if ( audiences . ValueKind == JsonValueKind . String )
613
- _audiences = new List < string > { audiences . GetString ( ) } ;
614
-
615
- if ( audiences . ValueKind == JsonValueKind . Array )
616
- {
617
- foreach ( JsonElement jsonElement in audiences . EnumerateArray ( ) )
618
- _audiences . Add ( jsonElement . ToString ( ) ) ;
619
- }
609
+ if ( audiences . ValueKind == JsonValueKind . String )
610
+ {
611
+ _audiences = new List < string > { audiences . GetString ( ) } ;
612
+ }
613
+ else if ( audiences . ValueKind == JsonValueKind . Array )
614
+ {
615
+ foreach ( JsonElement jsonElement in audiences . EnumerateArray ( ) )
616
+ _audiences . Add ( jsonElement . ToString ( ) ) ;
617
+ }
620
618
}
621
619
}
622
620
}
You can’t perform that action at this time.
0 commit comments