omniauth-bolt 0.0.0 → 0.1.0
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/lib/omniauth/strategies/bolt.rb +8 -4
- data/lib/omniauth-bolt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 510d07673008d52cf606747b16811930aec9549c0c4fa4c803a85658cf570598
|
4
|
+
data.tar.gz: a52f51df78199dba7ac9bd1c0842f422d658071e949102e1c8591a09472c10a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be62452e096816d12917eeb1dd82cc2ae2d3e5af732f0c1867d2f7df31d4946eb5321950dab47093b9b69d34c47a76a621efdf6f192e21deb4e7aefa45ca7ad6
|
7
|
+
data.tar.gz: f995a83b838a2768ab92bb916f2611f2562eb5c527aab4af922970e14558dfd731c7f693a323cae54a1736942b097caeb516287aa914ff1feab7f154707ab861
|
@@ -31,10 +31,6 @@ module OmniAuth
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def request_phase
|
34
|
-
OmniAuth::Form.build(:title => options.title, :url => callback_path) do
|
35
|
-
text_field 'Email', 'email'
|
36
|
-
end.to_response
|
37
|
-
|
38
34
|
session[:authorization_code] = request.params['authorization_code']
|
39
35
|
session[:scope] = request.params['scope']
|
40
36
|
|
@@ -64,9 +60,17 @@ module OmniAuth
|
|
64
60
|
post_data = URI.encode_www_form(payload)
|
65
61
|
res = http.request(req, post_data)
|
66
62
|
response = JSON.parse(res.body)
|
63
|
+
|
64
|
+
@expiration_time = Time.now.utc + response['expires_in']
|
65
|
+
@refresh_token = response['refresh_token']
|
66
|
+
@refresh_token_scope = response['refresh_token_scope']
|
67
67
|
@access_token = response['access_token']
|
68
68
|
@user_uid = response['id_token']
|
69
69
|
|
70
|
+
# don't need these values to refresh access_token so better remove them
|
71
|
+
session.delete('authorization_code')
|
72
|
+
session.delete('scope')
|
73
|
+
|
70
74
|
super
|
71
75
|
end
|
72
76
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-bolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniele Palombo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth
|