omniauth-humanid 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73bac9396336b430957d2055ecf42bc2beeb9e8dc074bfdd724ec25241ceb146
4
- data.tar.gz: fc808758428d8d81e06da8351afbb600fb38dfc32c026a8fae456f9836cbb9bc
3
+ metadata.gz: 99cf10308b8046dfa79c5e8061af8d86960b370e5960125307e39016c5e26d82
4
+ data.tar.gz: f45ad61e2c22e45e84ac78a21e49237c5e65717b9993cd91843812b332adaa85
5
5
  SHA512:
6
- metadata.gz: 5c534d28064f18c63b75141400ff9bb0f6a388450a696b30a8d99850f4850a3b6b6cd876cb035aa59573be40cb9f1610c248562d22f51aebf5675926c7376e87
7
- data.tar.gz: 1d86533a039f20ddeaf992e748cd18940d1cafda30d1ad285ca67dac402349fba4076c35688dae70fffed0d6e5daad29b7d7c2cfac18b3c700ca8c403b0f3a4c
6
+ metadata.gz: ed6685f61278e836f589bcdb7f252b3fb3ca03b250411502c371a0aca2cac5519ea44c7abac701d57590a8a92fe92e7d4e2c78b0422af1747a51a14794b8fcfb
7
+ data.tar.gz: 858b1ba735e0c85dc1ffb07126469a0179a65aa21ad4c9bb6efddbaaff9035fec3b3af27db5393ce00036db0be1e810948dd10f33600048971a9b865dfdeadee
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-humanid (0.0.20)
4
+ omniauth-humanid (0.0.21)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -21,6 +21,8 @@ module OmniAuth
21
21
  option :client_id, nil
22
22
  option :exchange_url, "https://core.human-id.org/[HUMANID_VERSION]/server/users/exchange"
23
23
 
24
+ attr_accessor :raw_info
25
+
24
26
  # def self.humanid_button
25
27
  # #see https://docs.human-id.org/web-sdk-integration-guide
26
28
  # %Q{<a href="#{options.local_sign_up_url}">
@@ -121,33 +123,28 @@ module OmniAuth
121
123
  res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true){|http| http.request(post_request)}
122
124
  Rails.logger.info("RESPONSE: #{res}")
123
125
  if res.code == "200"
124
- request.env['omniauth.auth'] = JSON.parse(res.body)
125
- Rails.logger.info(request.env['omniauth.auth'])
126
+ self.raw_info = JSON.parse(res.body)
127
+ Rails.logger.info("raw: #{raw_info}")
128
+ super
126
129
  else
127
130
  str = "Issue with the callback_phase of humanid omniauth, response from human id has code: #{res.code}, and body: #{res.body}"
128
131
  Rails.logger.error str
129
132
  raise StandardError.new(str)
130
133
  end
131
134
  end
132
-
135
+
136
+ def info
137
+ raw_info['data']
138
+ end
133
139
  def uid
134
- request.env['omniauth.auth']['data']['userAppId']
140
+ info['userAppId']
135
141
  end
136
- alias userAppId uid
137
-
138
142
  def countryCide
139
- request.env['omniauth.auth']['data']['countryCide']
143
+ info['countryCide']
140
144
  end
145
+ alias userAppId uid
141
146
  alias country_cide countryCide
142
147
  alias country_code countryCide
143
-
144
- def info
145
- request.env['omniauth.auth']['data']
146
- end
147
-
148
- def extra
149
- request.env['omniauth.auth']
150
- end
151
148
  end
152
149
  end
153
150
  end
@@ -1,4 +1,4 @@
1
- version = '0.0.20'
1
+ version = '0.0.21'
2
2
  #version must be on the first line for the update script
3
3
 
4
4
  Gem::Specification.new do |spec|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-humanid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Clancy