Class: Mysql::Protocol::AuthenticationResultPacket

Inherits:
Object
  • Object
show all
Defined in:
lib/mysql/protocol.rb

Overview

Authentication result packet

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ AuthenticationResultPacket

Returns a new instance of AuthenticationResultPacket.



851
852
853
# File 'lib/mysql/protocol.rb', line 851

def initialize(*args)
  @result, @auth_plugin, @scramble = args
end

Instance Attribute Details

#auth_pluginObject (readonly)

Returns the value of attribute auth_plugin.



849
850
851
# File 'lib/mysql/protocol.rb', line 849

def auth_plugin
  @auth_plugin
end

#resultObject (readonly)

Returns the value of attribute result.



849
850
851
# File 'lib/mysql/protocol.rb', line 849

def result
  @result
end

#scrambleObject (readonly)

Returns the value of attribute scramble.



849
850
851
# File 'lib/mysql/protocol.rb', line 849

def scramble
  @scramble
end

Class Method Details

.parse(pkt) ⇒ Object



842
843
844
845
846
847
# File 'lib/mysql/protocol.rb', line 842

def self.parse(pkt)
  result = pkt.utiny
  auth_plugin = pkt.string
  scramble = pkt.string
  self.new(result, auth_plugin, scramble)
end