Skip to content

Commit 0897b46

Browse files
committed
Updates
1 parent 9fd3120 commit 0897b46

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
@@ -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(

0 commit comments

Comments
 (0)