Class: Vagrant::Node::PwManager

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-node/pwmanager.rb

Instance Method Summary collapse

Constructor Details

#initialize(db) ⇒ PwManager

Returns a new instance of PwManager.



6
7
8
# File 'lib/vagrant-node/pwmanager.rb', line 6

def initialize(db)
  @dbmanager=db
end

Instance Method Details

#authorized?(token, challenge) ⇒ Boolean

Token is a MD5 token challenge was the

Returns:

  • (Boolean)


12
13
14
15
16
17
18
19
# File 'lib/vagrant-node/pwmanager.rb', line 12

def authorized?(token,challenge)
  #FIXME REMOVE
  # pp "CHECKING PASSWORD"
  # pp "TOKEN = #{token}"
  # pp "CHALLENGED = #{Digest::MD5.hexdigest([email protected]_password)}"    
  #pp "EN HEX DIGEST #{Digest::MD5.hexdigest([email protected]_password)}"    
  return token==Digest::MD5.hexdigest(challenge+@dbmanager.node_password)        
end