SASLPlain Class

SASL Plain AMQP authentication. This is SASL authentication using a basic username and password.

Inheritance
SASLPlain

Constructor

SASLPlain(hostname, username, password, port=None, verify=None, http_proxy=None, transport_type=TransportType.Amqp, encoding='UTF-8')

Parameters

Name Description
hostname
Required
str or bytes

The AMQP endpoint hostname.

username
Required
bytes or str

The authentication username.

password
Required
bytes or str

The authentication password.

port
int

The TLS port - default for AMQP is 5671.

Default value: None
verify
str

The path to a user-defined certificate.

Default value: None
http_proxy

HTTP proxy configuration. This should be a dictionary with the following keys present: 'proxy_hostname' and 'proxy_port'. Additional optional keys are 'username' and 'password'.

Default value: None
transport_type
<xref:uamqp.TransportType>

The transport protocol type - default is ~uamqp.TransportType.Amqp. ~uamqp.TransportType.AmqpOverWebsocket is applied when http_proxy is set or the transport type is explicitly requested.

Default value: TransportType.Amqp
encoding
str

The encoding to use if hostname and credentials are provided as a str. Default is 'UTF-8'.

Default value: UTF-8

Methods

close

Close the authentication layer and cleanup all the authentication wrapper objects.

set_io
set_tlsio

Setup the default underlying TLS IO layer. On Windows this is Schannel, on Linux and MacOS this is OpenSSL.

set_wsio

Setup the default underlying Web Socket IO layer.

close

Close the authentication layer and cleanup all the authentication wrapper objects.

close()

set_io

set_io(hostname, port, http_proxy, transport_type)

Parameters

Name Description
hostname
Required
port
Required
http_proxy
Required
transport_type
Required

set_tlsio

Setup the default underlying TLS IO layer. On Windows this is Schannel, on Linux and MacOS this is OpenSSL.

set_tlsio(hostname, port)

Parameters

Name Description
hostname
Required

The endpoint hostname.

port
Required
int

The TLS port.

set_wsio

Setup the default underlying Web Socket IO layer.

set_wsio(hostname, port, http_proxy)

Parameters

Name Description
hostname
Required

The endpoint hostname.

port
Required
int

The WSS port.

http_proxy
Required