Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 8592183

Browse files
add options to set basic auth header style
1 parent 6c72a83 commit 8592183

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/IdentityModel.AspNetCore.OAuth2Introspection/OAuth2IntrospectionOptions.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ public class OAuth2IntrospectionOptions : AuthenticationSchemeOptions
5454
/// </summary>
5555
public DiscoveryPolicy DiscoveryPolicy { get; set; } = new DiscoveryPolicy();
5656

57+
/// <summary>
58+
/// Gets or sets the basic authentication header style (RFC6749 vs RFC2617). Defaults to RFC6749.
59+
/// </summary>
60+
/// <value>
61+
/// The basic authentication header style.
62+
/// </value>
63+
public BasicAuthenticationHeaderStyle BasicAuthenticationHeaderStyle { get; set; } = BasicAuthenticationHeaderStyle.Rfc6749;
64+
5765
/// <summary>
5866
/// Specifies the timout for contacting the discovery endpoint
5967
/// </summary>

src/IdentityModel.AspNetCore.OAuth2Introspection/PostConfigureOAuth2IntrospectionOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ private async Task<IntrospectionClient> InitializeIntrospectionClient(OAuth2Intr
8989
{
9090
client = new IntrospectionClient(
9191
endpoint,
92+
headerStyle: Options.BasicAuthenticationHeaderStyle,
9293
innerHttpMessageHandler: Options.IntrospectionHttpHandler);
9394
}
9495
else

0 commit comments

Comments
 (0)