Class: HrrRbSsh::Authentication::Method::Password::Context
- Inherits:
-
Object
- Object
- HrrRbSsh::Authentication::Method::Password::Context
- Defined in:
- lib/hrr_rb_ssh/authentication/method/password/context.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username, password) ⇒ Context
constructor
A new instance of Context.
- #verify(username, password) ⇒ Object
Constructor Details
#initialize(username, password) ⇒ Context
Returns a new instance of Context.
13 14 15 16 17 18 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 13 def initialize username, password @username = username @password = password @logger = Logger.new self.class.name end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
11 12 13 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 11 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
11 12 13 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 11 def username @username end |
Instance Method Details
#verify(username, password) ⇒ Object
20 21 22 23 24 |
# File 'lib/hrr_rb_ssh/authentication/method/password/context.rb', line 20 def verify username, password @logger.info { "verify username and password" } @logger.debug { "username is #{username}, @username is #{@username}, and password is #{password}, @password is #{@password}" } username == @username and password == @password end |