Class: Vertica::Messages::Authentication

Inherits:
BackendMessage show all
Defined in:
lib/vertica/messages/backend_messages/authentication.rb

Constant Summary collapse

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

Constants inherited from BackendMessage

BackendMessage::MessageIdMap

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BackendMessage

factory, message_id

Methods inherited from Message

message_id, #message_string

Constructor Details

#initialize(data) ⇒ Authentication

Returns a new instance of Authentication.



20
21
22
23
24
25
26
# File 'lib/vertica/messages/backend_messages/authentication.rb', line 20

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

Instance Attribute Details

#auth_dataObject (readonly)

Returns the value of attribute auth_data.



18
19
20
# File 'lib/vertica/messages/backend_messages/authentication.rb', line 18

def auth_data
  @auth_data
end

#codeObject (readonly)

Returns the value of attribute code.



16
17
18
# File 'lib/vertica/messages/backend_messages/authentication.rb', line 16

def code
  @code
end

#saltObject (readonly)

Returns the value of attribute salt.



17
18
19
# File 'lib/vertica/messages/backend_messages/authentication.rb', line 17

def salt
  @salt
end