lib/omniauth/strategies/salesforce.rb in omniauth-salesforce-1.0.4 vs lib/omniauth/strategies/salesforce.rb in omniauth-salesforce-1.0.5

- old
+ new

@@ -32,11 +32,11 @@ super end def auth_hash signed_value = access_token.params['id'] + access_token.params['issued_at'] - raw_expected_signature = OpenSSL::HMAC.digest('sha256', options.client_secret, signed_value) + raw_expected_signature = OpenSSL::HMAC.digest('sha256', options.client_secret.to_s, signed_value) expected_signature = Base64.strict_encode64 raw_expected_signature signature = access_token.params['signature'] fail! "Salesforce user id did not match signature!" unless signature == expected_signature super end @@ -64,12 +64,11 @@ hash.merge!('refresh_token' => access_token.refresh_token) if access_token.refresh_token hash end def raw_info - access_token.options[:mode] = :query - access_token.options[:param_name] = :oauth_token + access_token.options[:mode] = :header @raw_info ||= access_token.post(access_token['id']).parsed end extra do raw_info.merge({ @@ -77,10 +76,10 @@ 'pod' => access_token.params['instance_url'], 'signature' => access_token.params['signature'], 'issued_at' => access_token.params['issued_at'] }) end - + end class SalesforceSandbox < OmniAuth::Strategies::Salesforce default_options[:client_options][:site] = 'https://test.salesforce.com' end