Class: HrrRbSsh::Authentication::Method::KeyboardInteractive::Context
- Inherits:
-
Object
- Object
- HrrRbSsh::Authentication::Method::KeyboardInteractive::Context
- Includes:
- Loggable
- Defined in:
- lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb
Instance Attribute Summary collapse
-
#authentication_methods ⇒ Object
readonly
Returns the value of attribute authentication_methods.
-
#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.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
-
#vars ⇒ Object
readonly
Returns the value of attribute vars.
Attributes included from Loggable
Instance Method Summary collapse
- #info_request(name, instruction, language_tag, prompts) ⇒ Object
-
#initialize(transport, username, submethods, variables, authentication_methods, logger: nil) ⇒ Context
constructor
A new instance of Context.
Methods included from Loggable
#log_debug, #log_error, #log_fatal, #log_info, #log_warn
Constructor Details
#initialize(transport, username, submethods, variables, authentication_methods, logger: nil) ⇒ Context
Returns a new instance of Context.
23 24 25 26 27 28 29 30 31 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 23 def initialize transport, username, submethods, variables, authentication_methods, logger: nil self.logger = logger @transport = transport @username = username @submethods = submethods @variables = variables @vars = variables @authentication_methods = authentication_methods end |
Instance Attribute Details
#authentication_methods ⇒ Object (readonly)
Returns the value of attribute authentication_methods.
15 16 17 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 15 def authentication_methods @authentication_methods end |
#info_response ⇒ Object (readonly)
Returns the value of attribute info_response.
15 16 17 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 15 def info_response @info_response end |
#submethods ⇒ Object (readonly)
Returns the value of attribute submethods.
15 16 17 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 15 def submethods @submethods end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
15 16 17 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 15 def username @username end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
15 16 17 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 15 def variables @variables end |
#vars ⇒ Object (readonly)
Returns the value of attribute vars.
15 16 17 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 15 def vars @vars end |
Instance Method Details
#info_request(name, instruction, language_tag, prompts) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb', line 33 def info_request name, instruction, language_tag, prompts log_info { "send userauth info request" } @transport.send InfoRequest.new(name, instruction, language_tag, prompts, logger: logger).to_payload log_info { "receive userauth info response" } @info_response = InfoResponse.new @transport.receive, logger: logger end |