File tree Expand file tree Collapse file tree
aspnetcore/blazor/security Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1556,7 +1556,8 @@ public class OpaqueTokenAuthenticationHandler(
15561556 IOptionsMonitor <OpaqueTokenAuthenticationOptions > options ,
15571557 ILoggerFactory logger ,
15581558 UrlEncoder encoder ,
1559- IConfiguration config )
1559+ IConfiguration config ,
1560+ IHttpClientFactory httpClientFactory )
15601561 : AuthenticationHandler <OpaqueTokenAuthenticationOptions >(options , logger , encoder )
15611562{
15621563 protected override async Task <AuthenticateResult > HandleAuthenticateAsync ()
@@ -1583,18 +1584,13 @@ public class OpaqueTokenAuthenticationHandler(
15831584
15841585 If the token is invalid, a failed authorization result is
15851586 returned.
1586-
1587- Values for the authentication server introspection URI
1588- ('{AUTH SERVER INTROSPECTION URI}') and the API client ID
1589- ('{API CLIENT ID}') can be supplied from app settings
1590- or any other configuration source.
15911587 */
15921588
15931589 var introspectionUri = options .IntrospectionEndpoint ;
15941590 var clientId = options .ClientId ;
15951591 var clientSecret = config [" Authentication:Schemes:AuthServer:ClientSecret" ];
15961592
1597- using var client = new HttpClient ();
1593+ using var client = httpClientFactory . CreateClient ();
15981594
15991595 // Set the Authorization header (base64 encoded credentials)
16001596 var authString = Convert .ToBase64String (
You can’t perform that action at this time.
0 commit comments