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

Instance Method Summary collapse

Instance Attribute Details

#password_digestObject

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