This document is for py-amqp's development version, which can be significantly different from previous releases. Get the stable docs here: 5.0.

amqp.spec

SASL mechanisms for AMQP authentication.

class amqp.sasl.AMQPLAIN(username, password)[source]

AMQPLAIN SASL authentication mechanism.

This is a non-standard mechanism used by AMQP servers.

mechanism = b'AMQPLAIN'
password
start(connection)[source]

Return the first response to a SASL challenge as a bytes object.

username
class amqp.sasl.EXTERNAL[source]

EXTERNAL SASL mechanism.

Enables external authentication, i.e. not handled through this protocol. Only passes ‘EXTERNAL’ as authentication mechanism, but no further authentication data.

mechanism = b'EXTERNAL'
start(connection)[source]

Return the first response to a SASL challenge as a bytes object.

amqp.sasl.GSSAPI

alias of FakeGSSAPI

class amqp.sasl.PLAIN(username, password)[source]

PLAIN SASL authentication mechanism.

See https://tools.ietf.org/html/rfc4616 for details

mechanism = b'PLAIN'
password
start(connection)[source]

Return the first response to a SASL challenge as a bytes object.

username
class amqp.sasl.RAW(mechanism, response)[source]

A generic custom SASL mechanism.

This mechanism takes a mechanism name and response to send to the server, so can be used for simple custom authentication schemes.

mechanism = None
start(connection)[source]

Return the first response to a SASL challenge as a bytes object.

class amqp.sasl.SASL[source]

The base class for all amqp SASL authentication mechanisms.

You should sub-class this if you’re implementing your own authentication.

property mechanism

Return a bytes containing the SASL mechanism name.

start(connection)[source]

Return the first response to a SASL challenge as a bytes object.