Sha256: 743cdc3c6dc88f4e04c11ed0e14ba74a9bf1c98736c641de94a44f7273273fec

Contents?: true

Size: 491 Bytes

Versions: 126

Compression:

Stored size: 491 Bytes

Contents

require "bunny/authentication/credentials_encoder"

module Bunny
  module Authentication
    # Encodes credentials using the PLAIN mechanism
    class PlainMechanismEncoder < CredentialsEncoder

      auth_mechanism "PLAIN", "plain"

      # Encodes provided credentials as described in RFC 2595
      # @api public
      # @see http://tools.ietf.org/rfc/rfc2595.txt RFC 2595
      def encode_credentials(username, password)
        "\0#{username}\0#{password}"
      end

    end
  end
end

Version data entries

126 entries across 126 versions & 2 rubygems

Version Path
bunny-1.1.5 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.1.4 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.1.3 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.1.2 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.1.1 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.1.0 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.1.0.rc1 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.7 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.6 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.5 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.1.0.pre2 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.1.0.pre1 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.4 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.3 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.2 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.1 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.0 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.0.rc3 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-1.0.0.rc2 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-0.10.8 lib/bunny/authentication/plain_mechanism_encoder.rb