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-2.12.0 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.12.0.rc1 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.11.0 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.11.0.pre1 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.10.0 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.9.2 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.9.1 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.6.7 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.7.4 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.8.1 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.9.0 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.7.3 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.8.0 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.7.2 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.7.1 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.7.0 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.6.6 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.6.5 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.6.4 lib/bunny/authentication/plain_mechanism_encoder.rb
bunny-2.6.3 lib/bunny/authentication/plain_mechanism_encoder.rb