Class OAuthAuthenticationProvider
Base authentication provider class
Inherited Members
Namespace: PnP.Core.Auth
Assembly: PnP.Core.Auth.dll
Syntax
public abstract class OAuthAuthenticationProvider : IAuthenticationProvider
Constructors
OAuthAuthenticationProvider(ILogger<OAuthAuthenticationProvider>)
Public constructor for any OAuth Authentication privider
Declaration
public OAuthAuthenticationProvider(ILogger<OAuthAuthenticationProvider> logger)
Parameters
| ILogger<OAuthAuthenticationProvider> logger |
Properties
ClientId
The ClientId of the application to use for authentication
Declaration
public string ClientId { get; set; }
Property Value
| string |
ConfigurationName
The Name of the configuration for the Authentication Provider
Declaration
public string ConfigurationName { get; set; }
Property Value
| string |
TenantId
The Tenant ID for the application, default value is "organizations" for multi-tenant applications
Declaration
public string TenantId { get; set; }
Property Value
| string |
Methods
AuthenticateRequestAsync(Uri, HttpRequestMessage)
Authenticates the specified request message.
Declaration
public abstract Task AuthenticateRequestAsync(Uri resource, HttpRequestMessage request)
Parameters
|
Uri
resource
Request uri |
|
HttpRequestMessage
request
The HttpRequestMessage to authenticate. |
Returns
|
Task
The task to await. |
Implements
GetAccessTokenAsync(Uri)
Gets an access token for the requested resource
Declaration
public abstract Task<string> GetAccessTokenAsync(Uri resource)
Parameters
|
Uri
resource
Resource to request an access token for |
Returns
|
Task<string>
An access token |