Class: HrrRbSsh::Authentication::Method::Password::Context
- Inherits:
-
Object
- Object
- HrrRbSsh::Authentication::Method::Password::Context
- Includes:
- Loggable
- Defined in:
- lib/hrr_rb_ssh/authentication/method/password/context.rb
Instance Attribute Summary collapse
-
#authentication_methods ⇒ Object
readonly
Returns the value of attribute authentication_methods.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#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
-
#initialize(username, password, variables, authentication_methods, logger: nil) ⇒ Context
constructor
A new instance of Context.
- #verify(username, password) ⇒ Object
Methods included from Loggable
#log_debug, #log_error, #log_fatal, #log_info, #log_warn
Constructor Details
#initialize(username, password, variables, authentication_methods, logger: nil) ⇒ Context
Returns a new instance of Context.
20 21 22 23 24 25 26 27 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 20 def initialize username, password, variables, authentication_methods, logger: nil self.logger = logger @username = username @password = password @variables = variables @vars = variables @authentication_methods = authentication_methods end |
Instance Attribute Details
#authentication_methods ⇒ Object (readonly)
Returns the value of attribute authentication_methods.
13 14 15 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 13 def authentication_methods @authentication_methods end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
13 14 15 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 13 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
13 14 15 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 13 def username @username end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
13 14 15 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 13 def variables @variables end |
#vars ⇒ Object (readonly)
Returns the value of attribute vars.
13 14 15 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 13 def vars @vars end |
Instance Method Details
#verify(username, password) ⇒ Object
29 30 31 32 33 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 29 def verify username, password log_info { "verify username and password" } log_debug { "username is #{username}, @username is #{@username}, and password is #{password}, @password is #{@password}" } username == @username and password == @password end |