Skip to content

Commit

Permalink
ManagedIdentityTokenProvider to support custom AzureServiceTokenProvi…
Browse files Browse the repository at this point in the history
…der (Azure#9943)

* ManagedIdentityTokenProvider to support custom AzureServiceTokenProvider

* XmlDoc change
  • Loading branch information
serkantkaraca authored Feb 13, 2020
1 parent c835437 commit 79f10ab
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ namespace Microsoft.Azure.EventHubs
/// </summary>
public class ManagedIdentityTokenProvider : TokenProvider
{
static readonly AzureServiceTokenProvider azureServiceTokenProvider = new AzureServiceTokenProvider();
readonly AzureServiceTokenProvider azureServiceTokenProvider;

/// <summary>
/// Initializes new instance of <see cref="ManagedIdentityTokenProvider"/> class with default <see cref="AzureServiceTokenProvider"/> configuration.
/// </summary>
public ManagedIdentityTokenProvider() : this(new AzureServiceTokenProvider()){}

/// <summary>
/// Initializes new instance of <see cref="ManagedIdentityTokenProvider"/> class with <see cref="AzureServiceTokenProvider"/>.
/// </summary>
/// <param name="azureServiceTokenProvider">The <see cref="AzureServiceTokenProvider"/> to be used to fetch access tokens.</param>
public ManagedIdentityTokenProvider(AzureServiceTokenProvider azureServiceTokenProvider)
{
this.azureServiceTokenProvider = azureServiceTokenProvider;
}

/// <summary>
/// Gets a <see cref="SecurityToken"/> for the given audience and duration.
Expand Down

0 comments on commit 79f10ab

Please sign in to comment.