Interface ISmtpOAuthProvider
A contract specifying the ability to authenticate an SMTP client with an OAuth 2 endpoint.
Namespace: DotNetNuke.Services.Mail.OAuth
Assembly: DotNetNuke.dll
Syntax
public interface ISmtpOAuthProvider
Properties
| Improve this Doc View SourceLocalizedName
Gets the localized name.
Declaration
string LocalizedName { get; }
Property Value
Type | Description |
---|---|
System.String |
Name
Gets provider name.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceAuthorize(Int32, IOAuth2SmtpClient)
Authorize the SMTP client.
Declaration
void Authorize(int portalId, IOAuth2SmtpClient smtpClient)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | The portal ID. |
IOAuth2SmtpClient | smtpClient | The SMTP client. |
AuthorizeAsync(Int32, IOAuth2SmtpClient, CancellationToken)
Authorize the SMTP client.
Declaration
Task AuthorizeAsync(int portalId, IOAuth2SmtpClient smtpClient, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | The portal ID. |
IOAuth2SmtpClient | smtpClient | The SMTP client. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A |
GetAuthorizeUrl(Int32)
Get the authorize URL.
Declaration
string GetAuthorizeUrl(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | The portal ID. |
Returns
Type | Description |
---|---|
System.String | The URL. |
GetSettings(Int32)
Get the provider parameters.
Declaration
IList<SmtpOAuthSetting> GetSettings(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | the portal ID of the setting, pass NullInteger if it's a global setting. |
Returns
Type | Description |
---|---|
IList<SmtpOAuthSetting> | The list of settings. |
IsAuthorized(Int32)
Whether the provider has completed the authorization process for the portal.
Declaration
bool IsAuthorized(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | The portal ID. |
Returns
Type | Description |
---|---|
System.Boolean | true if the authorization has been completed, otherwise false.. |
IsAuthorizedAsync(Int32, CancellationToken)
Whether the provider has completed the authorization process for the portal.
Declaration
Task<bool> IsAuthorizedAsync(int portalId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | The portal ID. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | true if the authorization has been completed, otherwise false.. |
UpdateSettings(Int32, IDictionary<String, String>, out IList<String>)
Update provider settings.
Declaration
bool UpdateSettings(int portalId, IDictionary<string, string> settings, out IList<string> errorMessages)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | The portal ID of the setting, pass NullInteger if it's a global setting. |
IDictionary<System.String, System.String> | settings | The settings. |
IList<System.String> | errorMessages | The errors. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the settings changed. |