Class InteractiveAuthenticationProvider
Authentication Provider that uses an interactive flow prompting the user for credentials
public class InteractiveAuthenticationProvider : OAuthAuthenticationProvider, IAuthenticationProvider
- Inheritance
-
InteractiveAuthenticationProvider
- Implements
- Inherited Members
Constructors
InteractiveAuthenticationProvider()
Public constructor for external consumers of the library
public InteractiveAuthenticationProvider()
InteractiveAuthenticationProvider(ILogger<OAuthAuthenticationProvider>, IMsalHttpClientFactory)
Public constructor leveraging DI to initialize the ILogger and IMsalHttpClientFactory interfaces
public InteractiveAuthenticationProvider(ILogger<OAuthAuthenticationProvider> logger, IMsalHttpClientFactory msalHttpClientFactory)
Parameters
loggerILogger<OAuthAuthenticationProvider>The instance of the logger service provided by DI
msalHttpClientFactoryIMsalHttpClientFactoryThe instance of the Msal Http Client Factory service provided by DI
InteractiveAuthenticationProvider(string, string, PnPCoreAuthenticationInteractiveOptions)
Public constructor for external consumers of the library
public InteractiveAuthenticationProvider(string clientId, string tenantId, PnPCoreAuthenticationInteractiveOptions options)
Parameters
clientIdstringThe Client ID for the Authentication Provider
tenantIdstringThe Tenant ID for the Authentication Provider
optionsPnPCoreAuthenticationInteractiveOptionsOptions for the authentication provider
InteractiveAuthenticationProvider(string, string, Uri)
Public constructor for external consumers of the library
public InteractiveAuthenticationProvider(string clientId, string tenantId, Uri redirectUri)
Parameters
clientIdstringThe Client ID for the Authentication Provider
tenantIdstringThe Tenant ID for the Authentication Provider
redirectUriUriThe Redirect URI for the authentication flow
Properties
RedirectUri
The Redirect URI for the authentication flow
public Uri RedirectUri { get; set; }
Property Value
Methods
AuthenticateRequestAsync(Uri, HttpRequestMessage)
Authenticates the specified request message.
public override Task AuthenticateRequestAsync(Uri resource, HttpRequestMessage request)
Parameters
resourceUriRequest uri
requestHttpRequestMessageThe HttpRequestMessage to authenticate.
Returns
- Task
The task to await.
GetAccessTokenAsync(Uri)
Gets an access token for the requested resource
public override Task<string> GetAccessTokenAsync(Uri resource)
Parameters
resourceUriResource to request an access token for
Returns
GetAccessTokenAsync(Uri, string[])
Gets an access token for the requested resource and scope
public override Task<string> GetAccessTokenAsync(Uri resource, string[] scopes)