AMQPAuth Class

AMQP authentication mixin.

Inheritance
builtins.object
AMQPAuth

Constructor

AMQPAuth(hostname, 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.

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 is 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