Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All credentials have parameterless ctor #43962

Merged
merged 2 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public BrowserCustomizationOptions() { }
}
public partial class ChainedTokenCredential : Azure.Core.TokenCredential
{
protected ChainedTokenCredential() { }
public ChainedTokenCredential(params Azure.Core.TokenCredential[] sources) { }
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand Down Expand Up @@ -180,6 +181,7 @@ public CredentialUnavailableException(string message, System.Exception innerExce
}
public partial class DefaultAzureCredential : Azure.Core.TokenCredential
{
protected DefaultAzureCredential() { }
public DefaultAzureCredential(Azure.Identity.DefaultAzureCredentialOptions options) { }
public DefaultAzureCredential(bool includeInteractiveCredentials = false) { }
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public class ChainedTokenCredential : TokenCredential
private readonly TokenCredential[] _sources;

/// <summary>
/// Constructor for instrumenting in tests
/// Protected constructor for <see href="https://aka.ms/azsdk/net/mocking">mocking</see>.
/// </summary>
internal ChainedTokenCredential()
protected ChainedTokenCredential()
{
_sources = Array.Empty<TokenCredential>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ public class DefaultAzureCredential : TokenCredential

internal TokenCredential[] _sources;

internal DefaultAzureCredential() : this(false) { }
/// <summary>
/// Protected constructor for <see href="https://aka.ms/azsdk/net/mocking">mocking</see>.
/// </summary>
protected DefaultAzureCredential() : this(false) { }

/// <summary>
/// Creates an instance of the DefaultAzureCredential class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public override TokenCredential GetTokenCredential(CommonCredentialTestConfig co
PlanId = "myplan",
JobId = "myjob",
TeamProjectId = "myteamproject",
SystemAccessToken = "mytoken"
SystemAccessToken = "mytoken",
HubName = "myhub",
christothes marked this conversation as resolved.
Show resolved Hide resolved
};
if (config.Transport != null)
{
Expand Down
Loading