Search Results for

    Show / Hide Table of Contents

    Class SmtpOAuthElement

    Represents a configuration element providing the SMTP XOAuth2 authentication settings.

    Inheritance
    object
    ConfigurationElement
    SmtpOAuthElement
    Implements
    IValidator
    Inherited Members
    ConfigurationElement.IsReadOnly()
    ConfigurationElement.Equals(object)
    ConfigurationElement.GetHashCode()
    ConfigurationElement.LockAttributes
    ConfigurationElement.LockAllAttributesExcept
    ConfigurationElement.LockElements
    ConfigurationElement.LockAllElementsExcept
    ConfigurationElement.LockItem
    ConfigurationElement.ElementInformation
    ConfigurationElement.CurrentConfiguration
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Nevatech.Vsb.Repository.Configuration
    Assembly: Nevatech.Vsb.Repository.dll
    Syntax
    public sealed class SmtpOAuthElement : ConfigurationElement, IValidator

    Constructors

    SmtpOAuthElement()

    Declaration
    public SmtpOAuthElement()

    Properties

    Authority

    Gets or sets the OAuth2 authority (issuer) URI. Default is "https://login.microsoftonline.com/common/".

    Declaration
    [ConfigurationProperty("authority")]
    public string Authority { get; set; }
    Property Value
    Type Description
    string
    Remarks

    Use "https://login.microsoftonline.com/{tenantId}/v2.0" for Microsoft Azure.

    ClientCertificate

    Gets the OAuth2 client X.509 certificate (optional).

    Declaration
    [ConfigurationProperty("clientCertificate")]
    public X509DefaultServiceCertificateElement ClientCertificate { get; }
    Property Value
    Type Description
    X509DefaultServiceCertificateElement

    ClientId

    Gets or sets the OAuth2 client ID (required).

    Declaration
    [ConfigurationProperty("clientId")]
    public string ClientId { get; set; }
    Property Value
    Type Description
    string

    ClientSecret

    Gets or sets the OAuth2 client secret (optional).

    Declaration
    [ConfigurationProperty("clientSecret")]
    public string ClientSecret { get; set; }
    Property Value
    Type Description
    string

    ErrorMessage

    When implemented, gets the message indicating the errors found during validation process.

    Declaration
    public string ErrorMessage { get; }
    Property Value
    Type Description
    string
    Remarks

    This property should be checked only if Validate() method returns False. If Validate() method returns True, this property should return Null.

    Properties

    Gets collection of configuration element properties.

    Declaration
    protected override ConfigurationPropertyCollection Properties { get; }
    Property Value
    Type Description
    ConfigurationPropertyCollection
    Overrides
    ConfigurationElement.Properties

    Scopes

    Gets or sets the space-separated OAuth2 scopes. Default is "https://outlook.office365.com/.default".

    Declaration
    [ConfigurationProperty("scopes")]
    public string Scopes { get; set; }
    Property Value
    Type Description
    string
    Remarks

    Use "https://outlook.office365.com/.default" for Microsoft 365. Use "https://communication.azure.com/.default" for Azure Communication Services.

    Methods

    Copy(SmtpOAuthElement)

    Copies the content of the specified configuration element to this configuration element.

    Declaration
    public void Copy(SmtpOAuthElement from)
    Parameters
    Type Name Description
    SmtpOAuthElement from

    The configuration element to be copied.

    Exceptions
    Type Condition
    ArgumentNullException

    thrown if the specified from argument is null.

    Validate()

    When implemented, evaluates the state of the object.

    Declaration
    public bool Validate()
    Returns
    Type Description
    bool

    True if state is valid; otherwise, false.

    Implements

    IValidator
    In This Article
    Back to top Nevatech Sentinet 6.7 Online Documentation