Skip to content

Commit

Permalink
Making GetClientAssertion method public (#2112)
Browse files Browse the repository at this point in the history
* Making GetClientAssertion abstract method and its implementations public to support inheritance of ClientAssertionProviderBase.
  • Loading branch information
JoshLozensky authored Mar 17, 2023
1 parent 5475d1e commit 9c1a60a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public AzureIdentityForKubernetesClientAssertion(string? filePath)
/// Get the signed assertion from a file.
/// </summary>
/// <returns>The signed assertion.</returns>
internal override Task<ClientAssertion> GetClientAssertion(CancellationToken cancellationToken)
public override Task<ClientAssertion> GetClientAssertion(CancellationToken cancellationToken)
{
string signedAssertion = File.ReadAllText(_filePath);
// Compute the expiry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public abstract class ClientAssertionProviderBase
/// </summary>
/// <param name="cancellationToken"></param>
/// <returns></returns>
internal abstract Task<ClientAssertion> GetClientAssertion(CancellationToken cancellationToken);
public abstract Task<ClientAssertion> GetClientAssertion(CancellationToken cancellationToken);

/// <summary>
/// Client assertion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ManagedIdentityClientAssertion(string? managedIdentityClientId)
/// acquired with managed identity (certificateless).
/// </summary>
/// <returns>The signed assertion.</returns>
internal override async Task<ClientAssertion> GetClientAssertion(CancellationToken cancellationToken)
public override async Task<ClientAssertion> GetClientAssertion(CancellationToken cancellationToken)
{
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = _managedIdentityClientId });

Expand Down
2 changes: 1 addition & 1 deletion tests/Microsoft.Identity.Web.Test/ClientAssertionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class TestClientAssertion : ClientAssertionProviderBase
{
private int _n = 0;

internal override Task<ClientAssertion> GetClientAssertion(CancellationToken cancellationToken)
public override Task<ClientAssertion> GetClientAssertion(CancellationToken cancellationToken)
{
_n++;
return Task.FromResult(new ClientAssertion(
Expand Down

0 comments on commit 9c1a60a

Please sign in to comment.