Sha256: 5faf06b5db812ec789388d525fe2e95208ec885074a4b4d4dafd5a050b5eea5f

Contents?: true

Size: 504 Bytes

Versions: 28

Compression:

Stored size: 504 Bytes

Contents

require "gorgon_bunny/authentication/credentials_encoder"

module GorgonBunny
  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

28 entries across 28 versions & 1 rubygems

Version Path
gorgon-0.6.5 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.6.4 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.6.3 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.6.2 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.6.1 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.6.0 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.6.0.rc2 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.6.0.rc1 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb