omniauth-humanid 0.0.18 → 0.0.20
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/update +9 -1
- data/lib/omniauth-humanid.rb +6 -1
- data/omniauth-humanid.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73bac9396336b430957d2055ecf42bc2beeb9e8dc074bfdd724ec25241ceb146
|
4
|
+
data.tar.gz: fc808758428d8d81e06da8351afbb600fb38dfc32c026a8fae456f9836cbb9bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c534d28064f18c63b75141400ff9bb0f6a388450a696b30a8d99850f4850a3b6b6cd876cb035aa59573be40cb9f1610c248562d22f51aebf5675926c7376e87
|
7
|
+
data.tar.gz: 1d86533a039f20ddeaf992e748cd18940d1cafda30d1ad285ca67dac402349fba4076c35688dae70fffed0d6e5daad29b7d7c2cfac18b3c700ca8c403b0f3a4c
|
data/Gemfile.lock
CHANGED
data/bin/update
CHANGED
@@ -26,8 +26,16 @@ x = x.join("\n")
|
|
26
26
|
puts x
|
27
27
|
File.write('./omniauth-humanid.gemspec', x)
|
28
28
|
puts "_______________________________________________"
|
29
|
+
puts "BUNDLE UPDATE"
|
30
|
+
puts `bundle update`
|
31
|
+
puts "_______________________________________________"
|
32
|
+
puts "GIT ADD"
|
29
33
|
puts `git add *`
|
30
34
|
puts "_______________________________________________"
|
35
|
+
puts "GIT COMMIT"
|
31
36
|
puts `git commit -m 'minor changes to version #{version_new}'`
|
32
37
|
puts "_______________________________________________"
|
33
|
-
puts
|
38
|
+
puts "INSTALL GEM LOCALLY"
|
39
|
+
puts `bundle exec rake install`
|
40
|
+
puts "_______________________________________________"
|
41
|
+
puts "info: write 'bundle exec rake release' to release the current version to the interwebz"
|
data/lib/omniauth-humanid.rb
CHANGED
@@ -108,6 +108,7 @@ module OmniAuth
|
|
108
108
|
#get the exchange_token from the humanID callback
|
109
109
|
Rails.logger.info("CALLBACK PHASE")
|
110
110
|
exchange_token = request.params['et']
|
111
|
+
Rails.logger.info("EXCHANGE TOKEN: #{exchange_token}")
|
111
112
|
|
112
113
|
#create the request (as per the humanID docs)
|
113
114
|
uri = get_exchange_uri
|
@@ -118,10 +119,14 @@ module OmniAuth
|
|
118
119
|
post_request.body = {"exchangeToken" => exchange_token}.to_json
|
119
120
|
#send the request, get the response.
|
120
121
|
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true){|http| http.request(post_request)}
|
122
|
+
Rails.logger.info("RESPONSE: #{res}")
|
121
123
|
if res.code == "200"
|
122
124
|
request.env['omniauth.auth'] = JSON.parse(res.body)
|
125
|
+
Rails.logger.info(request.env['omniauth.auth'])
|
123
126
|
else
|
124
|
-
|
127
|
+
str = "Issue with the callback_phase of humanid omniauth, response from human id has code: #{res.code}, and body: #{res.body}"
|
128
|
+
Rails.logger.error str
|
129
|
+
raise StandardError.new(str)
|
125
130
|
end
|
126
131
|
end
|
127
132
|
|
data/omniauth-humanid.gemspec
CHANGED