File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/Identity/ApiAuthorization.IdentityServer/src/Extensions Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 22// The .NET Foundation licenses this file to you under the MIT license.
33
44using System . Linq ;
5- using Duende . IdentityServer . Extensions ;
5+ using Duende . IdentityServer . Services ;
66using Microsoft . AspNetCore . Http ;
77using Microsoft . Extensions . Options ;
88
@@ -12,7 +12,8 @@ internal class DefaultClientRequestParametersProvider : IClientRequestParameters
1212{
1313 public DefaultClientRequestParametersProvider (
1414 IAbsoluteUrlFactory urlFactory ,
15- IOptions < ApiAuthorizationOptions > options )
15+ IOptions < ApiAuthorizationOptions > options ,
16+ IIssuerNameService nameService )
1617 {
1718 UrlFactory = urlFactory ;
1819 Options = options ;
@@ -22,10 +23,12 @@ public DefaultClientRequestParametersProvider(
2223
2324 public IOptions < ApiAuthorizationOptions > Options { get ; }
2425
26+ public IIssuerNameService NameService { get ; }
27+
2528 public IDictionary < string , string > GetClientParameters ( HttpContext context , string clientId )
2629 {
2730 var client = Options . Value . Clients [ clientId ] ;
28- var authority = context . GetIdentityServerIssuerUri ( ) ;
31+ var authority = NameService . GetCurrentAsync ( ) . GetAwaiter ( ) . GetResult ( ) ;
2932 if ( ! client . Properties . TryGetValue ( ApplicationProfilesPropertyNames . Profile , out var type ) )
3033 {
3134 throw new InvalidOperationException ( $ "Can't determine the type for the client '{ clientId } '") ;
You can’t perform that action at this time.
0 commit comments