예제 #1
0
 public MSITokenProviderFactory(MSILoginInformation msiLoginInformation)
 {
     this.msiLoginInformation = msiLoginInformation ?? throw new ArgumentNullException("msiLoginInformation");
 }
예제 #2
0
 public AzureCredentials(MSILoginInformation msiLoginInformation, AzureEnvironment environment)
     : this(tenantId : null, environment : environment)
 {
     this.msiTokenProviderFactory = new MSITokenProviderFactory(msiLoginInformation);
 }
 /// <summary>
 /// Creates a credentail object using token from local managed service identity endpoint.
 /// </summary>
 /// <param name="msiLoginInformation">the information needed for MSI authentication</param>
 /// <param name="environment">the environment to authenticate to</param>
 /// <returns>an authenticated credentials object</returns>
 public AzureCredentials FromMSI(MSILoginInformation msiLoginInformation, AzureEnvironment environment)
 {
     return(new AzureCredentials(msiLoginInformation, environment));
 }
 /// <summary>
 /// Creates MSITokenProvider.
 /// </summary>
 /// <param name="msiLoginInformation">describes the managed service identity configuration</param>
 public MSITokenProvider(string resource, MSILoginInformation msiLoginInformation)
 {
     this.resource            = resource ?? throw new ArgumentNullException("resource");
     this.msiLoginInformation = msiLoginInformation ?? throw new ArgumentNullException("msiLoginInformation");
 }
예제 #5
0
 /// <summary>
 /// Creates a credentail object using token from local managed service identity endpoint.
 /// </summary>
 /// <param name="msiLoginInformation">the information needed for MSI authentication</param>
 /// <param name="environment">the environment to authenticate to</param>
 /// <returns>an authenticated credentials object</returns>
 public AzureCredentials FromMSI(MSILoginInformation msiLoginInformation, AzureEnvironment environment, string tenantId = null)
 {
     return(new AzureCredentials(msiLoginInformation, environment, tenantId));
 }