omniauth-ebizzle 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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3eb57a7845b77522626522e6bf8a7b7029083a46
4
+ data.tar.gz: 0468579c1ea1bc51bc344beb3a222fc93033782f
5
+ SHA512:
6
+ metadata.gz: 6b32165a09d162903620f4ba93b40bb897fb95ba50af4c676818e544a324e7711c87979b9df4b6017499e6d4ecdfbac488cb524c0d7a28e1c19b44ca49c924e2
7
+ data.tar.gz: a09a80a5949756a3a38e84619678b9c765f314d9d421c32703d507bfb0bde7087d027ac459f6c460d1cdae3c3636e3f94918e57fb3d17b1e892bdc049ad833de
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Mark McEahern
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ omniauth-ebizzle
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,2 @@
1
+ require 'omniauth-ebizzle/version'
2
+ require 'omniauth/strategies/ebay'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Ebizzle
3
+ VERSION = '1.0'
4
+ end
5
+ end
@@ -0,0 +1,51 @@
1
+ require 'omniauth'
2
+ require 'ebay'
3
+
4
+ OmniAuth.config.add_camelization 'ebay', 'Ebay'
5
+
6
+ module OmniAuth
7
+ module Strategies
8
+ class Ebay
9
+ include OmniAuth::Strategy
10
+
11
+ args [
12
+ :passthrough_parameters,
13
+ ]
14
+
15
+ option :passthrough_parameters, {}
16
+
17
+ uid { user.guid }
18
+
19
+ info do
20
+ {
21
+ ebay_id: user.id,
22
+ auth_token: auth_token,
23
+ email: user.email,
24
+ full_name: user.name,
25
+ country: user.country,
26
+ }
27
+ end
28
+
29
+ def request_phase
30
+ session = Ebay::Repositories::SessionRepository.create
31
+
32
+ redirect session.to_login_url(
33
+ passthrough_parameters: options.passthrough_parameters)
34
+ end
35
+
36
+ private
37
+
38
+ def user
39
+ @user ||= Ebay::Repositories::UserRepository.find(
40
+ username: request.params['username'],
41
+ auth_token: auth_token)
42
+ end
43
+
44
+ def auth_token
45
+ @auth_token ||= Ebay::Repositories::TokenRepository.create(
46
+ username: request.params['username'],
47
+ secret: request.params['sid'])
48
+ end
49
+ end
50
+ end
51
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-ebizzle
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.0'
5
+ platform: ruby
6
+ authors:
7
+ - thekompanee
8
+ - goodscout
9
+ - jfelchner
10
+ - hhd418
11
+ - blakecash
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+ date: 2015-03-26 00:00:00.000000000 Z
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: omniauth
19
+ requirement: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - "~>"
22
+ - !ruby/object:Gem::Version
23
+ version: '1.0'
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - "~>"
29
+ - !ruby/object:Gem::Version
30
+ version: '1.0'
31
+ - !ruby/object:Gem::Dependency
32
+ name: rspec
33
+ requirement: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - "~>"
36
+ - !ruby/object:Gem::Version
37
+ version: '3.1'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - "~>"
43
+ - !ruby/object:Gem::Version
44
+ version: '3.1'
45
+ description: In this gem you will find an OmniAuth eBay strategy that is compliant
46
+ with the Open eBay Apps API.
47
+ email: support@thekompanee.com
48
+ executables: []
49
+ extensions: []
50
+ extra_rdoc_files: []
51
+ files:
52
+ - LICENSE
53
+ - README.md
54
+ - Rakefile
55
+ - lib/omniauth/ebizzle.rb
56
+ - lib/omniauth/ebizzle/version.rb
57
+ - lib/omniauth/strategies/ebay.rb
58
+ homepage: https://github.com/thekompanee/omniauth-ebay
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.4.6
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: OmniAuth strategy for eBay
82
+ test_files: []