omniauth-timetree 0.3.1 → 0.4.1
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/CHANGELOG.md +5 -0
- data/README.md +21 -16
- data/lib/omniauth/strategies/timetree.rb +8 -1
- data/lib/omniauth-timetree/version.rb +1 -1
- data/omniauth-timetree.gemspec +1 -0
- metadata +18 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9a5fff3fe16646c25023e1027e6236c78b3617a34e777f2358a7e5ba580463e
|
|
4
|
+
data.tar.gz: cfc00984d213cf542fc2220802b94a77749d21d71f496d9646fb02069f6b2e67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b32da01b98e146c511a36635deba62074cd29cfa71958cd2e9cc4987d5788d932ad898e331ab5336c4ed748ae2c8436c9f37947be48cdac3d97dcf68ca0eb58
|
|
7
|
+
data.tar.gz: ebee5f383878abefe51ec2cdd9619101c1ed32e530d616132d13f14848ec144f9335e86fc0c9782f79511172e35f80c0bfd97febe5ed322a7fb274156e302f5a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -41,23 +41,28 @@ Replace `"API_KEY"` and `"API_SECRET"` with the appropriate values you obtained
|
|
|
41
41
|
|
|
42
42
|
The auth hash `request.env['omniauth.auth']` would look like this:
|
|
43
43
|
|
|
44
|
-
```
|
|
44
|
+
```json
|
|
45
45
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
46
|
+
"provider": "timetree",
|
|
47
|
+
"uid": "12345",
|
|
48
|
+
"credentials": {
|
|
49
|
+
"token": "ACCESS_TOKEN",
|
|
50
|
+
"expires": false
|
|
51
|
+
},
|
|
52
|
+
"extra": {
|
|
53
|
+
"raw_info": {
|
|
54
|
+
"data": {
|
|
55
|
+
"id": "12345",
|
|
56
|
+
"type": "user",
|
|
57
|
+
"attributes": {
|
|
58
|
+
"name": "Your Name",
|
|
59
|
+
"description": "blah blah blah",
|
|
60
|
+
"image_url": "https://attachments.timetreeapp.com/path/to/image.png"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
61
66
|
```
|
|
62
67
|
|
|
63
68
|
## Contributing
|
|
@@ -8,7 +8,7 @@ module OmniAuth
|
|
|
8
8
|
option :name, 'timetree'
|
|
9
9
|
option :client_options, site: 'https://timetreeapp.com'
|
|
10
10
|
|
|
11
|
-
uid {
|
|
11
|
+
uid { extract_uid }
|
|
12
12
|
|
|
13
13
|
extra do
|
|
14
14
|
{raw_info: raw_info}
|
|
@@ -24,6 +24,13 @@ module OmniAuth
|
|
|
24
24
|
@raw_info = access_token.get(endpoint, options).parsed
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
def extract_uid
|
|
28
|
+
return unless raw_info
|
|
29
|
+
return unless raw_info['data']
|
|
30
|
+
|
|
31
|
+
raw_info['data']['id']
|
|
32
|
+
end
|
|
33
|
+
|
|
27
34
|
def callback_url
|
|
28
35
|
full_host + script_name + callback_path
|
|
29
36
|
end
|
data/omniauth-timetree.gemspec
CHANGED
|
@@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
29
29
|
spec.require_paths = ['lib']
|
|
30
30
|
|
|
31
|
+
spec.add_runtime_dependency 'omniauth', '~> 1.9'
|
|
31
32
|
spec.add_runtime_dependency 'omniauth-oauth2', '>= 1.6.0'
|
|
32
33
|
|
|
33
34
|
spec.add_development_dependency 'bundler'
|
metadata
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-timetree
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kenji Koshikawa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: omniauth
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.9'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.9'
|
|
13
27
|
- !ruby/object:Gem::Dependency
|
|
14
28
|
name: omniauth-oauth2
|
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -167,7 +181,7 @@ metadata:
|
|
|
167
181
|
homepage_uri: https://github.com/koshilife/omniauth-timetree
|
|
168
182
|
source_code_uri: https://github.com/koshilife/omniauth-timetree
|
|
169
183
|
changelog_uri: https://github.com/koshilife/omniauth-timetree/blob/master/CHANGELOG.md
|
|
170
|
-
documentation_uri: https://www.rubydoc.info/gems/omniauth-timetree/0.
|
|
184
|
+
documentation_uri: https://www.rubydoc.info/gems/omniauth-timetree/0.4.1
|
|
171
185
|
post_install_message:
|
|
172
186
|
rdoc_options: []
|
|
173
187
|
require_paths:
|
|
@@ -183,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
183
197
|
- !ruby/object:Gem::Version
|
|
184
198
|
version: '0'
|
|
185
199
|
requirements: []
|
|
186
|
-
rubygems_version: 3.
|
|
200
|
+
rubygems_version: 3.1.4
|
|
187
201
|
signing_key:
|
|
188
202
|
specification_version: 4
|
|
189
203
|
summary: OmniAuth strategy for TimeTree
|