Skip to content

Commit

Permalink
Fix typo in ClientCertificateCredentialOptions (Azure#15901)
Browse files Browse the repository at this point in the history
* Fix typo in ClientCertificateCredentialOptions

* Update api of Azure.Identity

Co-authored-by: Noam Hershtig <nohersht@microsoft.com>
  • Loading branch information
2 people authored and annelo-msft committed Feb 17, 2021
1 parent 8415543 commit 9211d77
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public partial class ClientCertificateCredentialOptions : Azure.Identity.TokenCr
public ClientCertificateCredentialOptions() { }
public bool AllowUnencryptedCache { get { throw null; } set { } }
public bool EnablePersistentCache { get { throw null; } set { } }
public bool IncludeX5CCliamHeader { get { throw null; } set { } }
public bool IncludeX5CClaimHeader { get { throw null; } set { } }
}
public partial class ClientSecretCredential : Azure.Core.TokenCredential
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ internal ClientCertificateCredential(string tenantId, string clientId, IX509Cert

_pipeline = pipeline ?? CredentialPipeline.GetInstance(options);

_client = client ?? new MsalConfidentialClient(_pipeline, tenantId, clientId, certificateProvider, (options as ClientCertificateCredentialOptions)?.IncludeX5CCliamHeader ?? false, options as ITokenCacheOptions);
_client = client ?? new MsalConfidentialClient(_pipeline, tenantId, clientId, certificateProvider, (options as ClientCertificateCredentialOptions)?.IncludeX5CClaimHeader ?? false, options as ITokenCacheOptions);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public class ClientCertificateCredentialOptions : TokenCredentialOptions, IToken
/// <summary>
/// Will include x5c header to enable subject name / issuer based authentication for the <see cref="ClientCertificateCredential"/>.
/// </summary>
public bool IncludeX5CCliamHeader { get; set; }
public bool IncludeX5CClaimHeader { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ public async Task FromX509Certificate2()
}

[Test]
public async Task IncludeX5CCliamHeader()
public async Task IncludeX5CClaimHeader()
{
var tenantId = TestEnvironment.ServicePrincipalTenantId;
var clientId = TestEnvironment.ServicePrincipalClientId;
var certPath = TestEnvironment.ServicePrincipalSniCertificatePath;

var options = InstrumentClientOptions(new ClientCertificateCredentialOptions { IncludeX5CCliamHeader = true });
var options = InstrumentClientOptions(new ClientCertificateCredentialOptions { IncludeX5CClaimHeader = true });

var credential = new ClientCertificateCredential(tenantId, clientId, certPath, options);

Expand Down

0 comments on commit 9211d77

Please sign in to comment.