File tree Expand file tree Collapse file tree
VirtualFinland.UserAPI/src/VirtualFinland.UsersAPI/Security/Features Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,10 +98,13 @@ public string GetSecurityPolicySchemeName()
9898 /// </summary>
9999 /// <param name="audience"></param>
100100 /// <exception cref="NotAuthorizedException"></exception>
101- public virtual void ValidateSecurityTokenAudience ( string audience )
101+ public virtual Task ValidateSecurityTokenAudience ( string audience )
102102 {
103- if ( ! _options . AudienceGuardEnabled ) return ;
104- if ( ! _options . AllowedAudiences . Contains ( audience ) ) throw new NotAuthorizedException ( "The given token audience is not allowed" ) ;
103+ if ( _options . AudienceGuardEnabled )
104+ {
105+ if ( ! _options . AllowedAudiences . Contains ( audience ) ) throw new NotAuthorizedException ( "The given token audience is not allowed" ) ;
106+ }
107+ return Task . CompletedTask ;
105108 }
106109
107110 /// <summary>
You can’t perform that action at this time.
0 commit comments