Sha256: f06553bad2d10f894963350332d8539d07184790e13df15cebb45e98c8cb9df3

Contents?: true

Size: 689 Bytes

Versions: 5

Compression:

Stored size: 689 Bytes

Contents

module Vertica
  module Protocol
    class Authentication < BackendMessage
      message_id 'R'

      OK                  = 0
      KERBEROS_V5         = 2
      CLEARTEXT_PASSWORD  = 3
      CRYPT_PASSWORD      = 4
      MD5_PASSWORD        = 5
      SCM_CREDENTIAL      = 6
      GSS                 = 7
      GSS_CONTINUE        = 8
      SSPI                = 9

      attr_reader :code
      attr_reader :salt
      attr_reader :auth_data

      def initialize(data)
        @code, other = data.unpack('Na*')
        case @code
          when CRYPT_PASSWORD, MD5_PASSWORD then @salt = other
          when GSS_CONTINUE then @auth_data = other
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vertica-1.0.3 lib/vertica/protocol/backend/authentication.rb
vertica-1.0.1 lib/vertica/protocol/backend/authentication.rb
vertica-1.0.0 lib/vertica/protocol/backend/authentication.rb
vertica-1.0.0.rc2 lib/vertica/protocol/backend/authentication.rb
vertica-1.0.0.rc1 lib/vertica/protocol/backend/authentication.rb