omniauth-ebay-oauth 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -4
- data/CHANGELOG.md +8 -0
- data/README.md +5 -4
- data/lib/omniauth/ebay-oauth/user_info_request.rb +1 -0
- data/lib/omniauth/ebay-oauth/version.rb +1 -1
- data/lib/omniauth/strategies/ebay_oauth.rb +1 -1
- data/omniauth-ebay-oauth.gemspec +2 -2
- data/spec/omniauth/strategies/ebay_oauth_spec.rb +14 -0
- metadata +5 -7
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9f4f01cdc95d969a4571571eb407395429b687d33e468992c7b3af0728f2be8
|
4
|
+
data.tar.gz: 7b1636011c2e893cf2e49f623c1ba1ac2d17b598bf7f27a7574babfc95fc4ac1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06a7581035f2fae8322d7bafbbb4ad49eb42365226cb6868550d256b797c3f25d14e7401bf2b98b8bcf0b33b8d59764c4642d7a8405b6302ceca2a9b87399bdb
|
7
|
+
data.tar.gz: af416600b1db5b2ad02e0f65ddd96ffbb14c2c48e75a0255b696bcfe08c5f2658ec5a2e0771a4620637ffab93c844a03beb8755b6cb9771b862fe8d14f83ce23
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.5.0] - 2019-04-04
|
8
|
+
|
9
|
+
### Added
|
10
|
+
|
11
|
+
- Added `prompt` option to allow login under different credentials. @Envek
|
12
|
+
|
13
|
+
See [Getting user consent](https://developer.ebay.com/api-docs/static/oauth-consent-request.html) documentation page for details.
|
14
|
+
|
7
15
|
## [0.4.0] - 2018-08-10
|
8
16
|
|
9
17
|
### Changed
|
data/README.md
CHANGED
@@ -20,15 +20,15 @@ This gem implements authorization with OAuth method while currently available ge
|
|
20
20
|
|
21
21
|
__What is the difference? Access tokens!__
|
22
22
|
|
23
|
-
With Auth'n'auth you will get a single token which you can use to access old eBay XML APIs (Trading API, etc.)
|
23
|
+
With Auth'n'auth you will get a single token which you can use to access only old eBay XML APIs (Trading API, etc.)
|
24
24
|
|
25
25
|
With OAuth, you will get a pair of access and refresh tokens which can be used to access new eBay REST APIs (Buy API, Sell API, etc.)
|
26
26
|
|
27
|
-
However, you can use new OAuth tokens to access old APIs by providing an access token in
|
27
|
+
However, you can use new OAuth tokens to access old APIs too by providing an access token in HTTP header `X-EBAY-API-IAF-TOKEN`. This is documented in eBay developer program website: [Using OAuth with the eBay traditional APIs](https://developer.ebay.com/api-docs/static/oauth-trad-apis.html#Implemen).
|
28
28
|
|
29
|
-
If you plan to use
|
29
|
+
If you plan to use new APIs, you are welcome to use this gem together with [ebay_api](https://github.com/nepalez/ebay_api) client gem for REST APIs.
|
30
30
|
|
31
|
-
|
31
|
+
For old APIs, you can look at [ebay_request](https://github.com/gzigzigzeo/ebay_request) gem (you can configure it to use OAuth tokens).
|
32
32
|
|
33
33
|
Now you can read the eBay docs about [REST APIs](https://developer.ebay.com/api-docs/static/ebay-rest-landing.html) and [OAuth](https://developer.ebay.com/api-docs/static/oauth-quick-ref-user-tokens.html) and then proceed to…
|
34
34
|
|
@@ -64,6 +64,7 @@ Required options:
|
|
64
64
|
Additional options:
|
65
65
|
- __sandbox__ - Are you running your application in [sandbox mode](<https://developer.ebay.com/api-docs/static/sandbox-landing.html>), default __`true`__.
|
66
66
|
- __scope__ - A list of [OAuth scopes](<https://developer.ebay.com/api-docs/static/oauth-details.html#scopes>) that provide access to the interfaces you call, default: __`[]`__. If you want change scopes you could pass it as string or as array of scopes like so: `['https://api.ebay.com/oauth/api_scope/sell.marketing.readonly', 'https://api.ebay.com/oauth/api_scope/sell.account.readonly']`
|
67
|
+
- __prompt__ - Use value `login` to ask user for login and password even if they're already logged in (useful for switching between multiple accounts). By default is absent.
|
67
68
|
- __read_timeout__ - Number of seconds to wait for one block to be read for Auth'n'auth eBay API requests, default is 60.
|
68
69
|
- \+ all [OmniAuth](<https://github.com/omniauth/omniauth>) supported options, like: `callback_path`, `provider_ignores_state` and so on.
|
69
70
|
|
data/omniauth-ebay-oauth.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path('
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require 'omniauth/ebay-oauth/version'
|
6
6
|
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency 'omniauth', '~> 1.5'
|
22
22
|
spec.add_dependency 'omniauth-oauth2', '~> 1.4'
|
23
23
|
|
24
|
-
spec.add_development_dependency 'bundler', '~>
|
24
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
25
25
|
spec.add_development_dependency 'rake', '>= 10'
|
26
26
|
spec.add_development_dependency 'rspec', '~> 3.5'
|
27
27
|
spec.add_development_dependency 'rubocop', '~> 0.42'
|
@@ -56,6 +56,20 @@ RSpec.describe OmniAuth::Strategies::EbayOauth do
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
+
context "when prompt isn't provided" do
|
60
|
+
it 'is absent' do
|
61
|
+
expect(subject.options.prompt).to be_nil
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context 'when prompt is provided' do
|
66
|
+
let(:options) { { prompt: :login } }
|
67
|
+
|
68
|
+
it 'concatenates passed scopes with space' do
|
69
|
+
expect(subject.options.prompt).to eql :login
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
59
73
|
context 'sandbox mode' do
|
60
74
|
let(:options) { { sandbox: true } }
|
61
75
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-ebay-oauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ignat Zakrevsky
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-04-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '2.0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '2.0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rake
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,7 +134,6 @@ files:
|
|
134
134
|
- ".gitignore"
|
135
135
|
- ".rspec"
|
136
136
|
- ".rubocop.yml"
|
137
|
-
- ".ruby-version"
|
138
137
|
- ".travis.yml"
|
139
138
|
- CHANGELOG.md
|
140
139
|
- Gemfile
|
@@ -176,8 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
175
|
- !ruby/object:Gem::Version
|
177
176
|
version: '0'
|
178
177
|
requirements: []
|
179
|
-
|
180
|
-
rubygems_version: 2.7.6
|
178
|
+
rubygems_version: 3.0.3
|
181
179
|
signing_key:
|
182
180
|
specification_version: 4
|
183
181
|
summary: OmniAuth strategy for new eBay OAuth API
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.4.3
|