Sha256: 9c8ad233f6c7642870921ac70b56b9c385b946d3bf99f037d86032c76ce2fb86

Contents?: true

Size: 732 Bytes

Versions: 24

Compression:

Stored size: 732 Bytes

Contents

# encoding: utf-8

module AMQP

  # Manages the encoding of credentials for the PLAIN authentication
  # mechanism.
  class AuthMechanismAdapter::Plain < AuthMechanismAdapter

    auth_mechanism "PLAIN"

    # Encodes credentials for the given username and password. This
    # involves sending the password across the wire in plaintext, so
    # PLAIN authentication should only be used over a secure transport
    # layer.
    #
    # @param [String] username The username to encode.
    # @param [String] password The password to encode.
    # @return [String] The username and password, encoded for the PLAIN
    #   mechanism.
    def encode_credentials(username, password)
      "\0#{username}\0#{password}"
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
amqp-1.8.0 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.7.0 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.6.0 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.5.3 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.5.2 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.5.1 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.5.0 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.4.2 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.4.1 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.4.0 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.3.0 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.2.1 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.2.0 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.1.8 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.1.7 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.1.6 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.1.5 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.1.4 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.1.3 lib/amqp/auth_mechanism_adapter/plain.rb
amqp-1.1.2 lib/amqp/auth_mechanism_adapter/plain.rb