Module: DRbService::PasswordAuthentication::ClassMethods
- Defined in:
- lib/drbservice/passwordauth.rb
Overview
Methods added to including classes when PasswordAuthentication is mixed in.
Instance Attribute Summary collapse
-
#password_digest ⇒ Object
The SHA2 digest of the service password.
Instance Method Summary collapse
-
#service_password(password) ⇒ Object
Set a password for the service.
Instance Attribute Details
#password_digest ⇒ Object
The SHA2 digest of the service password
16 17 18 |
# File 'lib/drbservice/passwordauth.rb', line 16 def password_digest @password_digest end |
Instance Method Details
#service_password(password) ⇒ Object
Set a password for the service. If you don’t specify a password, even guarded methods can be accessed. With a password set, the remote side can still call unguarded methods, but all other methods will be hidden.
21 22 23 24 |
# File 'lib/drbservice/passwordauth.rb', line 21 def service_password( password ) self.password_digest = Digest::SHA2.hexdigest( password ) DRbService.log.debug "Setting encrypted password for %p to " end |