Module: MnClient::API::Auth
- Defined in:
- lib/mn_client/api/auth.rb
Instance Method Summary collapse
Instance Method Details
#generate_signature(params, app_key, app_secret) ⇒ Object
9 10 11 12 13 |
# File 'lib/mn_client/api/auth.rb', line 9 def generate_signature(params,app_key,app_secret) params_str = params.keys.sort.map{|key| [key,params[key]] }.flatten.join sign = app_key+params_str+app_secret Digest::SHA1.hexdigest(sign).upcase end |