Skip to content

Commit

Permalink
Add support for ClientAssertion client auth (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinDockx authored Sep 25, 2020
1 parent c5ae809 commit 24a3d8b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/OidcClient/OidcClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ public virtual async Task<RefreshTokenResult> RefreshTokenAsync(string refreshTo
Address = Options.ProviderInformation.TokenEndpoint,
ClientId = Options.ClientId,
ClientSecret = Options.ClientSecret,
ClientAssertion = Options.ClientAssertion,
ClientCredentialStyle = Options.TokenClientCredentialStyle,
RefreshToken = refreshToken,
Parameters = extraParameters ?? new Dictionary<string, string>()
Expand Down
8 changes: 8 additions & 0 deletions src/OidcClient/OidcClientOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ public class OidcClientOptions
/// </value>
public string ClientSecret { get; set; }

/// <summary>
/// Gets or sets the client assertion (if needed).
/// </summary>
/// <value>
/// The client assertion.
/// </value>
public ClientAssertion ClientAssertion { get; set; } = new ClientAssertion();

/// <summary>
/// Gets or sets the scopes (required).
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/OidcClient/ResponseProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ private async Task<TokenResponse> RedeemCodeAsync(string code, AuthorizeState st

ClientId = _options.ClientId,
ClientSecret = _options.ClientSecret,
ClientAssertion = _options.ClientAssertion,
ClientCredentialStyle = _options.TokenClientCredentialStyle,

Code = code,
Expand Down

0 comments on commit 24a3d8b

Please sign in to comment.