Class: HrrRbSsh::Authentication::Method::KeyboardInteractive::InfoResponse
- Inherits:
-
Object
- Object
- HrrRbSsh::Authentication::Method::KeyboardInteractive::InfoResponse
- Defined in:
- lib/hrr_rb_ssh/authentication/method/keyboard_interactive/info_response.rb
Instance Attribute Summary collapse
-
#num_responses ⇒ Object
readonly
Returns the value of attribute num_responses.
-
#responses ⇒ Object
readonly
Returns the value of attribute responses.
Instance Method Summary collapse
-
#initialize(payload) ⇒ InfoResponse
constructor
A new instance of InfoResponse.
Constructor Details
#initialize(payload) ⇒ InfoResponse
Returns a new instance of InfoResponse.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/info_response.rb', line 15 def initialize payload case payload[0,1].unpack("C")[0] when Message::SSH_MSG_USERAUTH_INFO_RESPONSE::VALUE = Message::SSH_MSG_USERAUTH_INFO_RESPONSE.decode payload @num_responses = [:'num-responses'] @responses = Array.new([:'num-responses']){ |i| [:"response[#{i+1}]"] } else raise "Expected SSH_MSG_USERAUTH_INFO_RESPONSE, but got message number #{payload[0,1].unpack("C")[0]}" end end |
Instance Attribute Details
#num_responses ⇒ Object (readonly)
Returns the value of attribute num_responses.
11 12 13 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/info_response.rb', line 11 def num_responses @num_responses end |
#responses ⇒ Object (readonly)
Returns the value of attribute responses.
11 12 13 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/info_response.rb', line 11 def responses @responses end |