omniauth-dropbox2 0.0.2 → 1.0.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/lib/omniauth-dropbox2.rb +9 -9
- data/lib/omniauth-dropbox2/version.rb +1 -1
- metadata +11 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2adb55d1196f624c8e4ed3d29b02db4a54b4ea87
|
|
4
|
+
data.tar.gz: d7b8d0367d6e0bcdcf18aacdb2fc7430423d1074
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5bb9d3d02645e1c317b2b6af9a1553c7670fcc950f46794cc70f03b9ed731845a602dbf66c81b3034afcdf6ca047ca81d45e20988d1515aa4a1e3af8b62d0858
|
|
7
|
+
data.tar.gz: 99948112dfdc102547da17b09a5e93c4e6bc4c0768c2decde1774f1bdf4af82d52fb9b0051d1018761e9ccbc50fcea557cd8ee2813233f8e5ef8725ce2991980
|
data/lib/omniauth-dropbox2.rb
CHANGED
|
@@ -4,26 +4,26 @@ module OmniAuth
|
|
|
4
4
|
module Strategies
|
|
5
5
|
class Dropbox < OmniAuth::Strategies::OAuth2
|
|
6
6
|
# Give your strategy a name.
|
|
7
|
-
option :name,
|
|
7
|
+
option :name, 'dropbox'
|
|
8
8
|
|
|
9
9
|
# This is where you pass the options you would pass when
|
|
10
10
|
# initializing your consumer from the OAuth gem.
|
|
11
|
-
option :client_options,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
option :client_options,
|
|
12
|
+
site: 'https://api.dropbox.com/2',
|
|
13
|
+
authorize_url: 'https://www.dropbox.com/oauth2/authorize',
|
|
14
|
+
token_url: 'https://api.dropbox.com/oauth2/token',
|
|
15
|
+
connection_opts: { headers: { user_agent: 'Omniauth-Dropbox2', accept: 'application/json', content_type: 'application/json' } }
|
|
16
16
|
|
|
17
17
|
# These are called after authentication has succeeded. If
|
|
18
18
|
# possible, you should try to set the UID without making
|
|
19
19
|
# additional calls (if the user id is returned with the token
|
|
20
20
|
# or as a URI parameter). This may not be possible with all
|
|
21
21
|
# providers.
|
|
22
|
-
uid{
|
|
22
|
+
uid { aw_info['account_id'] }
|
|
23
23
|
|
|
24
24
|
info do
|
|
25
25
|
{
|
|
26
|
-
:
|
|
26
|
+
name: raw_info['name']['display_name']
|
|
27
27
|
}
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -34,7 +34,7 @@ module OmniAuth
|
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def raw_info
|
|
37
|
-
@raw_info ||= access_token.
|
|
37
|
+
@raw_info ||= access_token.post('users/get_current_account', body: nil.to_json).parsed
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
end
|
metadata
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-dropbox2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Claudio Poli
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - ~>
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '1.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - ~>
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '1.0'
|
|
27
27
|
description: OmniAuth strategy for Dropbox using OAuth2
|
|
28
28
|
email:
|
|
29
|
-
-
|
|
30
|
-
|
|
29
|
+
- 'masterkain@gmail.com
|
|
30
|
+
|
|
31
|
+
'
|
|
31
32
|
executables: []
|
|
32
33
|
extensions: []
|
|
33
34
|
extra_rdoc_files: []
|
|
34
35
|
files:
|
|
35
|
-
- .gitignore
|
|
36
|
+
- ".gitignore"
|
|
36
37
|
- Gemfile
|
|
37
38
|
- LICENSE.txt
|
|
38
39
|
- README.md
|
|
@@ -49,17 +50,17 @@ require_paths:
|
|
|
49
50
|
- lib
|
|
50
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
52
|
requirements:
|
|
52
|
-
- -
|
|
53
|
+
- - ">="
|
|
53
54
|
- !ruby/object:Gem::Version
|
|
54
55
|
version: '0'
|
|
55
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
57
|
requirements:
|
|
57
|
-
- -
|
|
58
|
+
- - ">="
|
|
58
59
|
- !ruby/object:Gem::Version
|
|
59
60
|
version: '0'
|
|
60
61
|
requirements: []
|
|
61
62
|
rubyforge_project:
|
|
62
|
-
rubygems_version: 2.
|
|
63
|
+
rubygems_version: 2.5.1
|
|
63
64
|
signing_key:
|
|
64
65
|
specification_version: 4
|
|
65
66
|
summary: OmniAuth strategy for Dropbox using OAuth2
|