Class: HrrRbSsh::Authentication::Method::KeyboardInteractive::Context
- Inherits:
-
Object
- Object
- HrrRbSsh::Authentication::Method::KeyboardInteractive::Context
- Defined in:
- lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb
Instance Attribute Summary collapse
-
#info_response ⇒ Object
readonly
Returns the value of attribute info_response.
-
#submethods ⇒ Object
readonly
Returns the value of attribute submethods.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #info_request(name, instruction, language_tag, prompts) ⇒ Object
-
#initialize(transport, username, submethods) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(transport, username, submethods) ⇒ Context
Returns a new instance of Context.
18 19 20 21 22 23 24 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 18 def initialize transport, username, submethods @transport = transport @username = username @submethods = submethods @logger = Logger.new self.class.name end |
Instance Attribute Details
#info_response ⇒ Object (readonly)
Returns the value of attribute info_response.
13 14 15 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 13 def info_response @info_response end |
#submethods ⇒ Object (readonly)
Returns the value of attribute submethods.
13 14 15 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 13 def submethods @submethods end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
13 14 15 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 13 def username @username end |
Instance Method Details
#info_request(name, instruction, language_tag, prompts) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 26 def info_request name, instruction, language_tag, prompts @logger.info { "send userauth info request" } @transport.send InfoRequest.new(name, instruction, language_tag, prompts).to_payload @logger.info { "receive userauth info response" } @info_response = InfoResponse.new @transport.receive end |