Class: Vertica::Messages::Authentication
- Inherits:
-
BackendMessage
- Object
- Message
- BackendMessage
- Vertica::Messages::Authentication
- 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
Instance Attribute Summary collapse
-
#auth_data ⇒ Object
readonly
Returns the value of attribute auth_data.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#salt ⇒ Object
readonly
Returns the value of attribute salt.
Instance Method Summary collapse
-
#initialize(data) ⇒ Authentication
constructor
A new instance of Authentication.
Methods inherited from BackendMessage
Methods inherited from Message
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_data ⇒ Object (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 |
#code ⇒ Object (readonly)
Returns the value of attribute code.
16 17 18 |
# File 'lib/vertica/messages/backend_messages/authentication.rb', line 16 def code @code end |
#salt ⇒ Object (readonly)
Returns the value of attribute salt.
17 18 19 |
# File 'lib/vertica/messages/backend_messages/authentication.rb', line 17 def salt @salt end |