omniauth_fresh_account 0.2.6 → 0.2.7

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: a43c519ea878bc04ec5fc162c7a577138eba3d3d1bde270101ddca11027cbeef
4
- data.tar.gz: dfac57d41914faef813caec587a53bedca6c0a5b03812a631abbb94288808cac
3
+ metadata.gz: ddc4b853aa73ab3a92e44a7a067ce0925d99e5c72c4c8ae44b5dc3a8e3b3f5fe
4
+ data.tar.gz: 91f60d3f09767de64294b4fbf3e9a9e99cd46d47d96d643801434de953ea8abe
5
5
  SHA512:
6
- metadata.gz: 2d21647f5859554840ad62cc7ef557c5b74eda8868cb7cf66d45d78d8e61c819e9a6769323838a99d2d6e47bd55a73e137efe5000f110a0ec68e53b42ebc0382
7
- data.tar.gz: 8f084963e23b4ced2463f66ca3f6958cdec2b45cce0b28ccbbc7ccc4fd9cbb3e6704a1f0bcd3ad2ebc6bc551a7579ee323f00253b7bc0bfeb5af26f74a1a8d8a
6
+ metadata.gz: 9b47689ee0e92de94826fb9eed61753a38bc5ace91b5e9ccae9aa2e957041e7e506b2d1a8d5592cbf6d348747733fd8aeb02481e4313f2c6be38972b3bb89699
7
+ data.tar.gz: 4998aae3bf7c19da2849064203888b1da2b0d2580e4e455a08113e57bf479821fbb63d7758637605811bce0c5b3942edb0450c67f0138a59abd4fe82f2b5af31
data/Gemfile.lock ADDED
@@ -0,0 +1,64 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ omniauth_fresh_account (0.2.7)
5
+ omniauth-oauth2 (~> 1.7.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.4.4)
11
+ faraday (1.3.0)
12
+ faraday-net_http (~> 1.0)
13
+ multipart-post (>= 1.2, < 3)
14
+ ruby2_keywords
15
+ faraday-net_http (1.0.1)
16
+ hashie (4.1.0)
17
+ jwt (2.2.2)
18
+ multi_json (1.15.0)
19
+ multi_xml (0.6.0)
20
+ multipart-post (2.1.1)
21
+ oauth2 (1.4.7)
22
+ faraday (>= 0.8, < 2.0)
23
+ jwt (>= 1.0, < 3.0)
24
+ multi_json (~> 1.3)
25
+ multi_xml (~> 0.5)
26
+ rack (>= 1.2, < 3)
27
+ omniauth (2.0.4)
28
+ hashie (>= 3.4.6)
29
+ rack (>= 1.6.2, < 3)
30
+ rack-protection
31
+ omniauth-oauth2 (1.7.1)
32
+ oauth2 (~> 1.4)
33
+ omniauth (>= 1.9, < 3)
34
+ rack (2.2.3)
35
+ rack-protection (2.1.0)
36
+ rack
37
+ rake (10.5.0)
38
+ rspec (3.10.0)
39
+ rspec-core (~> 3.10.0)
40
+ rspec-expectations (~> 3.10.0)
41
+ rspec-mocks (~> 3.10.0)
42
+ rspec-core (3.10.1)
43
+ rspec-support (~> 3.10.0)
44
+ rspec-expectations (3.10.1)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.10.0)
47
+ rspec-mocks (3.10.2)
48
+ diff-lcs (>= 1.2.0, < 2.0)
49
+ rspec-support (~> 3.10.0)
50
+ rspec-support (3.10.2)
51
+ ruby2_keywords (0.0.4)
52
+
53
+ PLATFORMS
54
+ ruby
55
+ x86_64-darwin-20
56
+
57
+ DEPENDENCIES
58
+ bundler (~> 2.0)
59
+ omniauth_fresh_account!
60
+ rake (~> 10.0)
61
+ rspec (~> 3.0)
62
+
63
+ BUNDLED WITH
64
+ 2.2.15
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "omniauth/fresh_account"
4
+ require "omniauth/strategies/fresh_account"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module FreshAccount
3
- VERSION = "0.2.6"
3
+ VERSION = "0.2.7"
4
4
  end
5
5
  end
@@ -0,0 +1,43 @@
1
+ require "omniauth/fresh_account/version"
2
+ require 'omniauth-oauth2'
3
+
4
+ class Kuda
5
+ def name
6
+ "kudakwashe"
7
+ end
8
+ end
9
+
10
+ class OmniAuth::Strategies::FreshAccount < OmniAuth::Strategies::OAuth2
11
+ # change the class name and the :name option to match your application name
12
+ option :name, :fresh_account
13
+
14
+ option :client_options, {
15
+ :site => "http://localhost:5000",
16
+ :authorize_url => "/oauth/authorize"
17
+ }
18
+
19
+ uid { raw_info["id"] }
20
+
21
+ info do
22
+ {
23
+ :email => raw_info["email"],
24
+ :name => raw_info["name"],
25
+ :avatar_url => raw_info["avatar_url"]
26
+ # and anything else you want to return to your API consumers
27
+ }
28
+ end
29
+
30
+ extra do
31
+ skip_info? ? {} : { :raw_info => raw_info }
32
+ end
33
+
34
+ def raw_info
35
+ @raw_info ||= access_token.get('/api/v1/me.json').parsed
36
+ end
37
+
38
+ # https://github.com/intridea/omniauth-oauth2/issues/81
39
+ def callback_url
40
+ full_host + script_name + callback_path
41
+ end
42
+ end
43
+
@@ -28,7 +28,6 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
 
30
30
  spec.add_dependency "omniauth-oauth2", "~> 1.7.1"
31
- spec.add_dependency "omniauth", [">= 2", "< 3"]
32
31
 
33
32
  spec.add_development_dependency "bundler", "~> 2.0"
34
33
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth_fresh_account
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kudakwashe Paradzayi
@@ -24,26 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.7.1
27
- - !ruby/object:Gem::Dependency
28
- name: omniauth
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '2'
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '3'
37
- type: :runtime
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '2'
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '3'
47
27
  - !ruby/object:Gem::Dependency
48
28
  name: bundler
49
29
  requirement: !ruby/object:Gem::Requirement
@@ -97,12 +77,13 @@ files:
97
77
  - ".rspec"
98
78
  - ".travis.yml"
99
79
  - Gemfile
80
+ - Gemfile.lock
100
81
  - README.md
101
82
  - Rakefile
102
83
  - bin/console
103
84
  - bin/setup
104
- - lib/omniauth/fresh_account.rb
105
85
  - lib/omniauth/fresh_account/version.rb
86
+ - lib/omniauth/strategies/fresh_account.rb
106
87
  - omniauth-progic_id-0.1.5.gem
107
88
  - omniauth_fresh_account.gemspec
108
89
  homepage: https://github.com/kudapara/omniauth_fresh_account
@@ -1,40 +0,0 @@
1
- require "omniauth/fresh_account/version"
2
- require 'omniauth-oauth2'
3
-
4
- module OmniAuth
5
- module Strategies
6
- class FreshAccount < OmniAuth::Strategies::OAuth2
7
- # change the class name and the :name option to match your application name
8
- option :name, :fresh_account
9
-
10
- option :client_options, {
11
- :site => "http://localhost:5000",
12
- :authorize_url => "/oauth/authorize"
13
- }
14
-
15
- uid { raw_info["id"] }
16
-
17
- info do
18
- {
19
- :email => raw_info["email"],
20
- :name => raw_info["name"],
21
- :avatar_url => raw_info["avatar_url"]
22
- # and anything else you want to return to your API consumers
23
- }
24
- end
25
-
26
- extra do
27
- skip_info? ? {} : { :raw_info => raw_info }
28
- end
29
-
30
- def raw_info
31
- @raw_info ||= access_token.get('/api/v1/me.json').parsed
32
- end
33
-
34
- # https://github.com/intridea/omniauth-oauth2/issues/81
35
- def callback_url
36
- full_host + script_name + callback_path
37
- end
38
- end
39
- end
40
- end