Class AadTokenMsiBasedProvider
Class that adapts the concrete Microsoft.Azure.Services.AppAuthentication.AzureServiceTokenProvider implementation to the ITokenProvider interface.
Inheritance
System.Object
AadTokenMsiBasedProvider
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fibula.Providers.Azure
Assembly: Fibula.Providers.Azure.dll
Syntax
public class AadTokenMsiBasedProvider : ITokenProvider
Constructors
| Improve this Doc View SourceAadTokenMsiBasedProvider()
Initializes a new instance of the AadTokenMsiBasedProvider class.
Declaration
public AadTokenMsiBasedProvider()
Properties
| Improve this Doc View SourceTokenCallback
Gets the most commonly used authentication callback: (authority, resource, scope) => async accessToken.
Declaration
public Func<string, string, string, Task<string>> TokenCallback { get; }
Property Value
Type | Description |
---|---|
System.Func<System.String, System.String, System.String, System.Threading.Tasks.Task<System.String>> |
Methods
| Improve this Doc View SourceGetAccessTokenAsync(String, String)
Gets an access token to access the given Azure resource.
Declaration
public Task<string> GetAccessTokenAsync(string resource, string tenantId = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | resource | The resource to access. e.g. 'https://management.azure.com/'. |
System.String | tenantId | If not specified, default tenant is used. Managed Service Identity REST protocols do not accept tenantId, so this can only be used with certificate and client secret based authentication. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | The access token. |