Show / Hide Table of Contents

    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 Source

    TokenCallback

    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 Source

    GetAccessTokenAsync(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.

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.