omniauth-withings2 0.1.1 → 0.2.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7bd28dca5dc2f8f040fe23b6d9dfee4f8fe97c99a85fe573762f1e19d97b8b39
|
|
4
|
+
data.tar.gz: 4dea6132bda3972a2ac4f44d88abacfc43339a5cc4d94de775ba428b67b8e876
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9da97f3a7d76ba32ae81eaddd073b9a5325c01572409cf949170c72cbc322fd7c73415df0c3178756ac00e23380c9bc1ba0c3f1fbbbaeaf9966a960a69808f7a
|
|
7
|
+
data.tar.gz: d4b3062b473b3d63d00e3263d2ba18ecf3873c2c5261121939d61b9ca066ae71e1d5ff77a199c7fcc2003379d03e7f13cc625902b01e6078484b7de8b7203055
|
data/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Or install it yourself as:
|
|
|
21
21
|
|
|
22
22
|
## Get your Oauth credentials
|
|
23
23
|
|
|
24
|
-
To register your application with Nokia and obtain a client id and consumer secret, go to the [Nokia application registration](https://account.
|
|
24
|
+
To register your application with Nokia and obtain a client id and consumer secret, go to the [Nokia application registration](https://account.withings.com/partner/add_oauth2).
|
|
25
25
|
|
|
26
26
|
## Running the example
|
|
27
27
|
|
|
@@ -82,7 +82,7 @@ api_access_token = OAuth::AccessToken.from_hash(oauth_consumer, {
|
|
|
82
82
|
})
|
|
83
83
|
|
|
84
84
|
# Change the uri to access other Nokia API endpoints
|
|
85
|
-
uri = "https://
|
|
85
|
+
uri = "https://wbsapi.withings.net/measure?action=getmeas&userid=#{nokia_user_id}"
|
|
86
86
|
|
|
87
87
|
request = api_access_token.get(uri)
|
|
88
88
|
JSON.parse(request.body)
|
|
@@ -6,9 +6,9 @@ module OmniAuth
|
|
|
6
6
|
|
|
7
7
|
option :name, 'withings2'
|
|
8
8
|
option :client_options, {
|
|
9
|
-
:site => 'https://account.
|
|
10
|
-
:authorize_url => 'https://account.
|
|
11
|
-
:token_url => 'https://account.
|
|
9
|
+
:site => 'https://account.withings.com',
|
|
10
|
+
:authorize_url => 'https://account.withings.com/oauth2_user/authorize2',
|
|
11
|
+
:token_url => 'https://account.withings.com/oauth2/token'
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
option :response_type, 'code'
|
data/omniauth-withings2.gemspec
CHANGED
|
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
|
|
|
10
10
|
s.homepage = "http://github.com/platejoy/omniauth-withings2"
|
|
11
11
|
s.summary = %q{OmniAuth OAuth2 strategy for Withings}
|
|
12
12
|
s.description = %q{OmniAuth OAuth2 strategy for Withings}
|
|
13
|
+
s.license = 'MIT'
|
|
13
14
|
|
|
14
15
|
s.files = `git ls-files`.split($\)
|
|
15
16
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
@@ -27,15 +27,15 @@ describe "OmniAuth::Strategies::Withings2" do
|
|
|
27
27
|
|
|
28
28
|
context 'client options' do
|
|
29
29
|
it 'has correct OAuth endpoint' do
|
|
30
|
-
expect(subject.options.client_options.site).to eq('https://account.
|
|
30
|
+
expect(subject.options.client_options.site).to eq('https://account.withings.com')
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
it 'has correct authorize url' do
|
|
34
|
-
expect(subject.options.client_options.authorize_url).to eq('https://account.
|
|
34
|
+
expect(subject.options.client_options.authorize_url).to eq('https://account.withings.com/oauth2_user/authorize2')
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
it 'has correct token url' do
|
|
38
|
-
expect(subject.options.client_options.token_url).to eq('https://account.
|
|
38
|
+
expect(subject.options.client_options.token_url).to eq('https://account.withings.com/oauth2/token')
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-withings2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Nelson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth-oauth2
|
|
@@ -46,7 +46,8 @@ files:
|
|
|
46
46
|
- spec/omniauth/strategies/withings2_spec.rb
|
|
47
47
|
- spec/spec_helper.rb
|
|
48
48
|
homepage: http://github.com/platejoy/omniauth-withings2
|
|
49
|
-
licenses:
|
|
49
|
+
licenses:
|
|
50
|
+
- MIT
|
|
50
51
|
metadata: {}
|
|
51
52
|
post_install_message:
|
|
52
53
|
rdoc_options: []
|