Interface ITokenProvider
Abstracts a token provider service.
Namespace: Fibula.Providers.Contracts
Assembly: Fibula.Providers.Contracts.dll
Syntax
public interface ITokenProvider
Properties
| Improve this Doc View SourceTokenCallback
Gets the most commonly used authentication callback: (authority, resource, scope) => async accessToken.
Declaration
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 resource.
Declaration
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. |