Search Results for

    Show / Hide Table of Contents

    Class InteractiveAuthenticationProvider

    Authentication Provider that uses an interactive flow prompting the user for credentials

    Inheritance
    System.Object
    OAuthAuthenticationProvider
    InteractiveAuthenticationProvider
    Inherited Members
    OAuthAuthenticationProvider.ConfigurationName
    OAuthAuthenticationProvider.ClientId
    OAuthAuthenticationProvider.TenantId
    Namespace: PnP.Core.Auth
    Assembly: PnP.Core.Auth.dll
    Syntax
    public class InteractiveAuthenticationProvider : OAuthAuthenticationProvider, IAuthenticationProvider

    Constructors

    InteractiveAuthenticationProvider()

    Public constructor for external consumers of the library

    Declaration
    public InteractiveAuthenticationProvider()

    InteractiveAuthenticationProvider(ILogger<OAuthAuthenticationProvider>, IMsalHttpClientFactory)

    Public constructor leveraging DI to initialize the ILogger and IMsalHttpClientFactory interfaces

    Declaration
    public InteractiveAuthenticationProvider(ILogger<OAuthAuthenticationProvider> logger, IMsalHttpClientFactory msalHttpClientFactory)
    Parameters
    ILogger<OAuthAuthenticationProvider> logger

    The instance of the logger service provided by DI

    IMsalHttpClientFactory msalHttpClientFactory

    The instance of the Msal Http Client Factory service provided by DI

    InteractiveAuthenticationProvider(String, String, PnPCoreAuthenticationInteractiveOptions)

    Public constructor for external consumers of the library

    Declaration
    public InteractiveAuthenticationProvider(string clientId, string tenantId, PnPCoreAuthenticationInteractiveOptions options)
    Parameters
    System.String clientId

    The Client ID for the Authentication Provider

    System.String tenantId

    The Tenant ID for the Authentication Provider

    PnPCoreAuthenticationInteractiveOptions options

    Options for the authentication provider

    InteractiveAuthenticationProvider(String, String, Uri)

    Public constructor for external consumers of the library

    Declaration
    public InteractiveAuthenticationProvider(string clientId, string tenantId, Uri redirectUri)
    Parameters
    System.String clientId

    The Client ID for the Authentication Provider

    System.String tenantId

    The Tenant ID for the Authentication Provider

    Uri redirectUri

    The Redirect URI for the authentication flow

    Properties

    RedirectUri

    The Redirect URI for the authentication flow

    Declaration
    public Uri RedirectUri { get; set; }
    Property Value
    Uri

    Methods

    AuthenticateRequestAsync(Uri, HttpRequestMessage)

    Authenticates the specified request message.

    Declaration
    public override async Task AuthenticateRequestAsync(Uri resource, HttpRequestMessage request)
    Parameters
    Uri resource

    Request uri

    HttpRequestMessage request

    The to authenticate.

    Returns
    Task

    The task to await.

    Overrides
    OAuthAuthenticationProvider.AuthenticateRequestAsync(Uri, HttpRequestMessage)

    GetAccessTokenAsync(Uri)

    Gets an access token for the requested resource

    Declaration
    public override async Task<string> GetAccessTokenAsync(Uri resource)
    Parameters
    Uri resource

    Resource to request an access token for

    Returns
    Task<System.String>

    An access token

    Overrides
    OAuthAuthenticationProvider.GetAccessTokenAsync(Uri)

    GetAccessTokenAsync(Uri, String[])

    Gets an access token for the requested resource and scope

    Declaration
    public override async Task<string> GetAccessTokenAsync(Uri resource, string[] scopes)
    Parameters
    Uri resource

    Resource to request an access token for (unused)

    System.String[] scopes

    Scopes to request

    Returns
    Task<System.String>

    An access token

    Overrides
    OAuthAuthenticationProvider.GetAccessTokenAsync(Uri, String[])
    Back to top PnP Core SDK
    Generated by DocFX with Material UI
    spacer