Module: Wsse::Authenticator

Defined in:
lib/wsse/authenticator.rb

Class Method Summary collapse

Class Method Details

.authenticate(token, username, password) ⇒ Object



7
8
9
10
11
# File 'lib/wsse/authenticator.rb', line 7

def self.authenticate(token, username, password)
  return :wrong_username unless judge_username(token, username)
  return :wrong_password unless judge_password(token, password)
  return :success
end

.authenticate?(token, username, password) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/wsse/authenticator.rb', line 24

def self.authenticate?(token, username, password)
  return (self.authenticate(token, username, password) == :success)
end