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.11.1 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.11.0 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.10.5 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.10.4 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.10.3 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.10.2 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.10.1 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.10.0 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.9.0 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.8.4 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.8.3 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.8.2 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.8.1 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.8.0 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.7.1 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.7.0 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.7.0.rc4 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.7.0.rc3 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.7.0.rc2 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb
gorgon-0.7.0.rc1 lib/gorgon_bunny/lib/gorgon_bunny/authentication/plain_mechanism_encoder.rb