Skip to content

Commit 14b0851

Browse files
committed
Updates
1 parent f2befd1 commit 14b0851

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

aspnetcore/blazor/security/blazor-web-app-with-oidc.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)