Class: Shortwave::Authentication::Mobile

Inherits:
Session
  • Object
show all
Defined in:
lib/shortwave/authentication.rb

Overview

Authentication for mobile applications. Don’t use this for web/desktop applications use either Authentication::Web or Authentication::Desktop instead

Instance Attribute Summary

Attributes inherited from Session

#session_key

Instance Method Summary collapse

Methods inherited from Session

#initialize, #merge!, #signature, #signed_in?

Constructor Details

This class inherits a constructor from Shortwave::Authentication::Session

Instance Method Details

#authenticate(username, password) ⇒ Object

Authenticates with a user’s username and password



68
69
70
71
# File 'lib/shortwave/authentication.rb', line 68

def authenticate(username, password)
  response = @facade.mobile_session(username, MD5.hexdigest(username + MD5.hexdigest(password)))
  parse_session_response(response)
end