• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class SaslOAuth2Token

An OAuth 2.0 access token for SASL authentication via the XOAUTH2 mechanism. Immutable. Used by Gmail and Office 365 across SMTP, POP3, and IMAP.

Inheritance
object
SaslOAuth2Token
SmtpOAuth2Token
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Mail.Rfc.Sasl
Assembly: DRIT.Mail.dll
Syntax
public class SaslOAuth2Token
Remarks

The library does not obtain OAuth tokens. The caller acquires the token (via MSAL.NET, Google.Apis.Auth, etc.) and passes it in. This keeps the library dependency-free.

Constructors

View Source

SaslOAuth2Token(string, string)

Initializes a new instance of the SaslOAuth2Token class.

Declaration
public SaslOAuth2Token(string userName, string accessToken)
Parameters
Type Name Description
string userName

The user name (email address) associated with the token.

string accessToken

The OAuth 2.0 access token.

Remarks

The library does not obtain OAuth tokens. The caller acquires the token (via MSAL.NET, Google.Apis.Auth, etc.) and passes it in. This keeps the library dependency-free.

Properties

View Source

AccessToken

Gets the OAuth 2.0 access token.

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

The library does not obtain OAuth tokens. The caller acquires the token (via MSAL.NET, Google.Apis.Auth, etc.) and passes it in. This keeps the library dependency-free.

View Source

UserName

Gets the user name (email address) associated with the token.

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

The library does not obtain OAuth tokens. The caller acquires the token (via MSAL.NET, Google.Apis.Auth, etc.) and passes it in. This keeps the library dependency-free.

  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX