Class AMQ::Client::Async::AuthMechanismAdapter
In: lib/amq/client/async/auth_mechanism_adapter.rb
Parent: Object

Provides a flexible method for encoding AMQP credentials. PLAIN and EXTERNAL are provided by this gem. In order to implement a new authentication mechanism, create a subclass like so:

  class MyAuthMechanism < AMQ::Client::Async::AuthMechanismAdapter
    auth_mechanism "X-MYAUTH"

    def encode_credentials(username, password)
      # ...
    end
  end

Methods

Classes and Modules

Class AMQ::Client::Async::AuthMechanismAdapter::External
Class AMQ::Client::Async::AuthMechanismAdapter::Plain

Attributes

adapter  [R]  The Adapter that this AuthMechanismAdapter operates on behalf of.

Public Class methods

Find and instantiate an AuthMechanismAdapter.

@param [Adapter] adapter The Adapter for which to encode credentials. @return [AuthMechanismAdapter] An AuthMechanismAdapter that can encode

  credentials for the Adapter.

@raise [NotImplementedError] The Adapter‘s mechanism does not

  correspond to any known AuthMechanismAdapter.

Create a new AuthMechanismAdapter. Users of this class should instead retrieve an instance through for_adapter.

Protected Class methods

Used by subclasses to declare the mechanisms that an AuthMechanismAdapter understands.

@param [Array<String>] mechanisms One or more mechanisms that can be

  handled by the subclass.

[Validate]