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 @@ -1558,7 +1558,8 @@ public class OpaqueTokenAuthenticationHandler(
15581558 IOptionsMonitor <OpaqueTokenAuthenticationOptions > options ,
15591559 ILoggerFactory logger ,
15601560 UrlEncoder encoder ,
1561- IConfiguration config )
1561+ IConfiguration config ,
1562+ IHttpClientFactory httpClientFactory )
15621563 : AuthenticationHandler <OpaqueTokenAuthenticationOptions >(options , logger , encoder )
15631564{
15641565 protected override async Task <AuthenticateResult > HandleAuthenticateAsync ()
@@ -1585,18 +1586,13 @@ public class OpaqueTokenAuthenticationHandler(
15851586
15861587 If the token is invalid, a failed authorization result is
15871588 returned.
1588-
1589- Values for the authentication server introspection URI
1590- ('{AUTH SERVER INTROSPECTION URI}') and the API client ID
1591- ('{API CLIENT ID}') can be supplied from app settings
1592- or any other configuration source.
15931589 */
15941590
15951591 var introspectionUri = options .IntrospectionEndpoint ;
15961592 var clientId = options .ClientId ;
15971593 var clientSecret = config [" Authentication:Schemes:AuthServer:ClientSecret" ];
15981594
1599- using var client = new HttpClient ();
1595+ using var client = httpClientFactory . CreateClient ();
16001596
16011597 // Set the Authorization header (base64 encoded credentials)
16021598 var authString = Convert .ToBase64String (
You can’t perform that action at this time.
0 commit comments