Show / Hide Table of Contents

Class SaslProfile

The SaslProfile is the base class of an SASL profile implementation. It provides the basic support for frame exchange during SASL authentication.

Inheritance
System.Object
SaslProfile
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Amqp.Sasl
Assembly: Amqp.Net.dll
Syntax
public abstract class SaslProfile

Constructors

SaslProfile(Symbol)

Initializes a SaslProfile object.

Declaration
protected SaslProfile(Symbol mechanism)
Parameters
Type Name Description
Symbol mechanism

The SASL profile mechanism.

Properties

Anonymous

Gets a SASL ANONYMOUS profile.

Declaration
public static SaslProfile Anonymous { get; }
Property Value
Type Description
SaslProfile

External

Gets a SASL EXTERNAL profile.

Declaration
public static SaslProfile External { get; }
Property Value
Type Description
SaslProfile

Mechanism

Gets the mechanism of the SASL profile.

Declaration
public Symbol Mechanism { get; }
Property Value
Type Description
Symbol

Methods

GetStartCommand(String)

Gets a SASL command, which is typically a SaslInit command for the client, or a SaslMechanisms command for the server, to start SASL negotiation.

Declaration
protected abstract DescribedList GetStartCommand(string hostname)
Parameters
Type Name Description
System.String hostname

The hostname of the remote peer.

Returns
Type Description
DescribedList

A SASL command to send to the remote peer.

Match(Symbol)

Checks if a mechanism is supported.

Declaration
protected virtual bool Match(Symbol mechanism)
Parameters
Type Name Description
Symbol mechanism

A mechanism supported by the remote peer.

Returns
Type Description
System.Boolean

True if the mechanism is supported; False otherwise.

OnCommand(DescribedList)

Processes the received command and returns a response. If returns null, the SASL handshake completes.

Declaration
protected abstract DescribedList OnCommand(DescribedList command)
Parameters
Type Name Description
DescribedList command

The SASL command received from the peer.

Returns
Type Description
DescribedList

A SASL command as a response to the incoming command.

UpgradeTransport(ITransport)

If a profile needs to change the buffer (e.g. encryption), it should create a new ITransport object. Otherwise, it can simply return the same transport object.

Declaration
protected abstract ITransport UpgradeTransport(ITransport transport)
Parameters
Type Name Description
ITransport transport

The current transport.

Returns
Type Description
ITransport

A transport upgraded from the current transport per the SASL mechanism.

Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX