Class: HrrRbSsh::Authentication::Method::KeyboardInteractive
- Inherits:
-
HrrRbSsh::Authentication::Method
- Object
- HrrRbSsh::Authentication::Method
- HrrRbSsh::Authentication::Method::KeyboardInteractive
- Defined in:
- lib/hrr_rb_ssh/authentication/method/keyboard_interactive.rb,
lib/hrr_rb_ssh/authentication/method/keyboard_interactive/context.rb,
lib/hrr_rb_ssh/authentication/method/keyboard_interactive/info_request.rb,
lib/hrr_rb_ssh/authentication/method/keyboard_interactive/info_response.rb
Defined Under Namespace
Classes: Context, InfoRequest, InfoResponse
Constant Summary collapse
- NAME =
'keyboard-interactive'- PREFERENCE =
30
Instance Method Summary collapse
- #authenticate(userauth_request_message) ⇒ Object
-
#initialize(transport, options) ⇒ KeyboardInteractive
constructor
A new instance of KeyboardInteractive.
Methods included from SubclassWithPreferenceListable
#[], #inherited, #list_preferred, #list_supported
Constructor Details
#initialize(transport, options) ⇒ KeyboardInteractive
Returns a new instance of KeyboardInteractive.
13 14 15 16 17 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive.rb', line 13 def initialize transport, @logger = Logger.new(self.class.name) @transport = transport @authenticator = .fetch( 'authentication_keyboard_interactive_authenticator', Authenticator.new { false } ) end |
Instance Method Details
#authenticate(userauth_request_message) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/hrr_rb_ssh/authentication/method/keyboard_interactive.rb', line 19 def authenticate @logger.info { "authenticate" } @logger.debug { "userauth request: " + .inspect } username = [:'user name'] submethods = [:'submethods'] context = Context.new(@transport, username, submethods) @authenticator.authenticate context end |