live_contacts 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/live_contacts.rb +3 -2
- metadata +1 -1
data/lib/live_contacts.rb
CHANGED
@@ -41,7 +41,7 @@ require 'hmac-sha2'
|
|
41
41
|
# end
|
42
42
|
class LiveContacts
|
43
43
|
|
44
|
-
VERSION = '0.0.
|
44
|
+
VERSION = '0.0.6'
|
45
45
|
|
46
46
|
# Live application attibutes
|
47
47
|
attr_accessor :application_name, :app_id,:secret, :security_algorithm, :return_url, :privacy_policy_url, :application_verifier_required, :timestamp
|
@@ -161,7 +161,8 @@ class LiveContacts
|
|
161
161
|
|
162
162
|
# FIXME copied from Microsoft demo
|
163
163
|
def generate_app_verifier(ip = nil)
|
164
|
-
token = "appid=#{self.app_id}&ts=#{self.timestamp.to_i.to_s
|
164
|
+
token = "appid=#{self.app_id}&ts=#{self.timestamp ? self.timestamp.to_i.to_s : Time.now.utc.to_i.to_s}"
|
165
|
+
RAILS_DEFAULT_LOGGER.debug token.inspect.yellow.bold
|
165
166
|
token += "&ip=#{ip}" if ip
|
166
167
|
token += "&sig=#{CGI.escape(Base64.encode64((signToken(token))))}"
|
167
168
|
CGI.escape token
|