omniauth-bonofa 0.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 +7 -0
- data/.DS_Store +0 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +49 -0
- data/LICENSE.txt +22 -0
- data/README.md +101 -0
- data/Rakefile +27 -0
- data/lib/omniauth/bonofa/configuration.rb +36 -0
- data/lib/omniauth/bonofa/version.rb +5 -0
- data/lib/omniauth/bonofa.rb +2 -0
- data/lib/omniauth/strategies/bonofa.rb +35 -0
- data/lib/omniauth-bonofa.rb +2 -0
- data/omniauth-bonofa.gemspec +27 -0
- data/tests/bonofa_test.rb +22 -0
- data/tests/configuration_test.rb +23 -0
- data/tests/support/shared_examples.rb +69 -0
- data/tests/test_helper.rb +57 -0
- metadata +131 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2c28e3bcb7b2d0c6ef314922f2118ee9a51b40fd
|
4
|
+
data.tar.gz: ee85c4806ff91bdb39d4531d5ee3e6c26b6a212c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4a07f44233d04d325e482003911d1d95368ef76ff7f511d9f1a93f9cd1ba63616cfcf8f82d7b0e72e76230331231463c2a76e96964fc2b7e801aad71501e47c2
|
7
|
+
data.tar.gz: 2e93bdca83a45673cd40ce13857f0f22bc708699eb70131b97101a1a7d2a60b8e3fcefde03ddb2bd59e8f328ebf74402b3de295aafe5b2b2860257c37b186dfd
|
data/.DS_Store
ADDED
Binary file
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
omniauth-bonofa (0.0.1)
|
5
|
+
omniauth-oauth2 (~> 1.1.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
faraday (0.9.0)
|
11
|
+
multipart-post (>= 1.2, < 3)
|
12
|
+
hashie (2.1.1)
|
13
|
+
jwt (1.0.0)
|
14
|
+
metaclass (0.0.4)
|
15
|
+
minitest (5.3.4)
|
16
|
+
minitest-rg (5.1.0)
|
17
|
+
minitest (~> 5.0)
|
18
|
+
mocha (1.1.0)
|
19
|
+
metaclass (~> 0.0.1)
|
20
|
+
multi_json (1.10.1)
|
21
|
+
multi_xml (0.5.5)
|
22
|
+
multipart-post (2.0.0)
|
23
|
+
oauth2 (0.9.4)
|
24
|
+
faraday (>= 0.8, < 0.10)
|
25
|
+
jwt (~> 1.0)
|
26
|
+
multi_json (~> 1.3)
|
27
|
+
multi_xml (~> 0.5)
|
28
|
+
rack (~> 1.2)
|
29
|
+
omniauth (1.2.1)
|
30
|
+
hashie (>= 1.2, < 3)
|
31
|
+
rack (~> 1.0)
|
32
|
+
omniauth-oauth2 (1.1.2)
|
33
|
+
faraday (>= 0.8, < 0.10)
|
34
|
+
multi_json (~> 1.3)
|
35
|
+
oauth2 (~> 0.9.3)
|
36
|
+
omniauth (~> 1.2)
|
37
|
+
rack (1.5.2)
|
38
|
+
rake (10.3.2)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
bundler (~> 1.3)
|
45
|
+
minitest
|
46
|
+
minitest-rg
|
47
|
+
mocha
|
48
|
+
omniauth-bonofa!
|
49
|
+
rake
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Ruo
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
# Omniauth Bonofa
|
2
|
+
|
3
|
+
[Bonofa Shop](http://www.opportunity-2014.com) is an international Sales-Platform with all the functions and aspects of a social network.
|
4
|
+
|
5
|
+
This gem contains the Bonofa strategy for OmniAuth.
|
6
|
+
|
7
|
+
Bonofa uses OAuth 2. This strategy implements the browser variant of the "Sign in with Bonofa" flow.
|
8
|
+
|
9
|
+
## Before You Begin
|
10
|
+
|
11
|
+
You should have already installed OmniAuth into your app; if not, read the [OmniAuth README](https://github.com/intridea/omniauth) to get started.
|
12
|
+
|
13
|
+
Now contact administrator of Bonofa to create an application. Then you should get application_id and secret_key from him.
|
14
|
+
Make sure to send a callback URL to administrator or else you may get authentication errors. (It doesn't matter what it is, just that it is set.)
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
18
|
+
Add this line to your application's Gemfile:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
gem 'omniauth-bonofa'
|
22
|
+
```
|
23
|
+
|
24
|
+
And then execute:
|
25
|
+
|
26
|
+
$ bundle
|
27
|
+
|
28
|
+
Or install it yourself as:
|
29
|
+
|
30
|
+
$ gem install omniauth-bonofa
|
31
|
+
|
32
|
+
Next, tell OmniAuth about this provider. For a Rails app, your `config/initializers/omniauth.rb` file should look like this:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
36
|
+
provider :bonofa, "APPLICATION_ID", "SECRET_KEY"
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
or
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
44
|
+
provider :bonofa, "APPLICATION_ID", "SECRET_KEY", {
|
45
|
+
site: 'http://www.opportunity-2014.com',
|
46
|
+
authorize_url: '/oauth/authorize',
|
47
|
+
}
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
Replace APPLICATION_ID and SECRET_KEY with the appropriate values you obtained from administrator earlier.
|
52
|
+
|
53
|
+
## Authentication Hash
|
54
|
+
|
55
|
+
An example auth hash available in `request.env['omniauth.auth']`:
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
{
|
59
|
+
"provider"=>:bonofa_shop,
|
60
|
+
"uid"=>1,
|
61
|
+
"info"=>
|
62
|
+
{
|
63
|
+
"email" => "info@bonofa.com",
|
64
|
+
"first_name" => "Alexander",
|
65
|
+
"last_name" => "Bierbrauer",
|
66
|
+
"promotion_code" => "bonofa",
|
67
|
+
"profile_image_url" => "http://www.opportunity-2014.com/assets/profile_image_thumb.png",
|
68
|
+
"language" => "en",
|
69
|
+
},
|
70
|
+
"credentials"=>
|
71
|
+
{
|
72
|
+
"token"=>"e8d6f6685e08ca8e3874a36d421de0020d6f714a3576c2c543726b18d5c3ce89",
|
73
|
+
"expires_at"=>1391245607,
|
74
|
+
"expires"=>true
|
75
|
+
},
|
76
|
+
"extra"=>{
|
77
|
+
"raw_info"=>
|
78
|
+
{
|
79
|
+
"id" => 1,
|
80
|
+
"email" => "info@bonofa.com",
|
81
|
+
"first_name" => "Alexander",
|
82
|
+
"second_name" => "Bierbrauer",
|
83
|
+
"promotion_code" => "bonofa",
|
84
|
+
"profile_image_url" => "http://www.opportunity-2014.com/assets/profile_image_thumb.png",
|
85
|
+
"language" => "en",
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
```
|
90
|
+
|
91
|
+
## Supported Rubies
|
92
|
+
|
93
|
+
OmniAuth Bonofa is tested under 1.8.7, 1.9.2, 1.9.3, 2.0.0, and Ruby Enterprise Edition.
|
94
|
+
|
95
|
+
## Contributing
|
96
|
+
|
97
|
+
1. Fork it
|
98
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
99
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
100
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
101
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require 'rake/testtask'
|
3
|
+
Bundler::GemHelper.install_tasks
|
4
|
+
|
5
|
+
task :console do
|
6
|
+
puts "Loading development console..."
|
7
|
+
system("irb -r omniauth-bonofa")
|
8
|
+
end
|
9
|
+
|
10
|
+
task :help do
|
11
|
+
puts "Available rake tasks: "
|
12
|
+
puts "rake console - Run a IRB console with all enviroment loaded"
|
13
|
+
puts "rake test - Run tests"
|
14
|
+
end
|
15
|
+
|
16
|
+
task :test do
|
17
|
+
Dir.chdir('tests')
|
18
|
+
end
|
19
|
+
|
20
|
+
Rake::TestTask.new(:test) do |t|
|
21
|
+
t.libs << '../lib'
|
22
|
+
t.libs << '../tests'
|
23
|
+
t.test_files = FileList['*_test.rb']
|
24
|
+
t.verbose = false
|
25
|
+
end
|
26
|
+
|
27
|
+
task :default => :test
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Omniauth
|
2
|
+
module Bonofa
|
3
|
+
class << self
|
4
|
+
attr_reader :configuration
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.configuration
|
8
|
+
@@configuration ||= Configuration.instance
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.configure
|
12
|
+
yield(self.configuration) if block_given?
|
13
|
+
end
|
14
|
+
|
15
|
+
class Configuration
|
16
|
+
attr_writer :site, :authorize_url
|
17
|
+
include Singleton
|
18
|
+
|
19
|
+
def site
|
20
|
+
@site || "http://www.opportunity-2014.com"
|
21
|
+
end
|
22
|
+
|
23
|
+
def authorize_url
|
24
|
+
@authorize_url || "/oauth/authorize"
|
25
|
+
end
|
26
|
+
|
27
|
+
def client_options
|
28
|
+
{
|
29
|
+
:site => self.site,
|
30
|
+
:authorize_url => self.authorize_url
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require "omniauth/bonofa/configuration"
|
2
|
+
require 'omniauth/strategies/oauth2'
|
3
|
+
|
4
|
+
module OmniAuth
|
5
|
+
module Strategies
|
6
|
+
class Bonofa < OmniAuth::Strategies::OAuth2
|
7
|
+
option :name, :bonofa
|
8
|
+
|
9
|
+
uid { raw_info["id"] }
|
10
|
+
|
11
|
+
info do
|
12
|
+
{
|
13
|
+
:email => raw_info["email"],
|
14
|
+
:first_name => raw_info["first_name"],
|
15
|
+
:last_name => raw_info["last_name"],
|
16
|
+
:language => raw_info["shop_language"],
|
17
|
+
:promotion_code => raw_info["promotion_code"],
|
18
|
+
:profile_image_url => raw_info["profile_image_url"],
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
extra do
|
23
|
+
{ :raw_info => raw_info }
|
24
|
+
end
|
25
|
+
|
26
|
+
def client
|
27
|
+
::OAuth2::Client.new(options.client_id, options.client_secret, deep_symbolize(Omniauth::Bonofa.configuration.client_options))
|
28
|
+
end
|
29
|
+
|
30
|
+
def raw_info
|
31
|
+
@raw_info ||= access_token.get('/api/v1/me.json').parsed
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'omniauth/bonofa/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "omniauth-bonofa"
|
8
|
+
spec.version = Omniauth::Bonofa::VERSION
|
9
|
+
spec.authors = ["Ruo"]
|
10
|
+
spec.email = ["siera04@gmail.com"]
|
11
|
+
spec.description = "Bonofa strategy for Omniauth"
|
12
|
+
spec.summary = "Bonofa strategy for Omniauth"
|
13
|
+
spec.homepage = "https://github.com/c7devteam/bonofa_main_omniauth"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.1.1'
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
|
25
|
+
spec.add_development_dependency 'minitest'
|
26
|
+
spec.add_development_dependency 'mocha'
|
27
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'omniauth-bonofa'
|
3
|
+
require 'openssl'
|
4
|
+
require 'base64'
|
5
|
+
|
6
|
+
class StrategyTest < StrategyTestCase
|
7
|
+
include OAuth2StrategyTests
|
8
|
+
end
|
9
|
+
|
10
|
+
class ClientTest < StrategyTestCase
|
11
|
+
test 'has correct Bonofa site' do
|
12
|
+
assert_equal 'http://www.opportunity-2014.com', strategy.client.site
|
13
|
+
end
|
14
|
+
|
15
|
+
test 'has correct authorize url' do
|
16
|
+
assert_equal '/oauth/authorize', strategy.client.options[:authorize_url]
|
17
|
+
end
|
18
|
+
|
19
|
+
test 'has correct token url' do
|
20
|
+
assert_equal '/oauth/token', strategy.client.options[:token_url]
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'omniauth-bonofa'
|
3
|
+
|
4
|
+
class StrategyTest < StrategyTestCase
|
5
|
+
include OAuth2StrategyTests
|
6
|
+
end
|
7
|
+
|
8
|
+
class ConfigurationTest < StrategyTestCase
|
9
|
+
test "should set the configuration vars from site url" do
|
10
|
+
Omniauth::Bonofa.configure do |config|
|
11
|
+
config.site = "http://www.opportunity-2014.com"
|
12
|
+
end
|
13
|
+
assert_equal Omniauth::Bonofa.configuration.site, "http://www.opportunity-2014.com"
|
14
|
+
assert_equal 'http://www.opportunity-2014.com', strategy.client.site
|
15
|
+
end
|
16
|
+
|
17
|
+
test "should set configuration vars" do
|
18
|
+
Omniauth::Bonofa.configure do |config|
|
19
|
+
config.authorize_url = "/oauth/authorize"
|
20
|
+
end
|
21
|
+
assert_equal Omniauth::Bonofa.configuration.authorize_url, "/oauth/authorize"
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# NOTE it would be useful if this lived in omniauth-oauth2 eventually
|
2
|
+
module OAuth2StrategyTests
|
3
|
+
def self.included(base)
|
4
|
+
base.class_eval do
|
5
|
+
include ClientTests
|
6
|
+
include AuthorizeParamsTests
|
7
|
+
include CSRFAuthorizeParamsTests
|
8
|
+
include TokenParamsTests
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module ClientTests
|
13
|
+
extend BlockTestHelper
|
14
|
+
|
15
|
+
test 'should be initialized with symbolized client_options' do
|
16
|
+
#options = { :client_options => { 'authorize_url' => 'https://example.com' } }
|
17
|
+
#assert_equal 'https://example.com', strategy.client.options[:authorize_url]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
module AuthorizeParamsTests
|
22
|
+
extend BlockTestHelper
|
23
|
+
|
24
|
+
test 'should include any authorize params passed in the :authorize_params option' do
|
25
|
+
@options = { :authorize_params => { :foo => 'bar', :baz => 'zip' } }
|
26
|
+
assert_equal 'bar', strategy.authorize_params['foo']
|
27
|
+
assert_equal 'zip', strategy.authorize_params['baz']
|
28
|
+
end
|
29
|
+
|
30
|
+
test 'should include top-level options that are marked as :authorize_options' do
|
31
|
+
@options = { :authorize_options => [:scope, :foo], :scope => 'bar', :foo => 'baz' }
|
32
|
+
assert_equal 'bar', strategy.authorize_params['scope']
|
33
|
+
assert_equal 'baz', strategy.authorize_params['foo']
|
34
|
+
end
|
35
|
+
|
36
|
+
test 'should exclude top-level options that are not passed' do
|
37
|
+
@options = { :authorize_options => [:bar] }
|
38
|
+
refute_has_key :bar, strategy.authorize_params
|
39
|
+
refute_has_key 'bar', strategy.authorize_params
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
module CSRFAuthorizeParamsTests
|
44
|
+
extend BlockTestHelper
|
45
|
+
|
46
|
+
test 'should store random state in the session when none is present in authorize or request params' do
|
47
|
+
assert_includes strategy.authorize_params.keys, 'state'
|
48
|
+
refute_empty strategy.authorize_params['state']
|
49
|
+
refute_empty strategy.session['omniauth.state']
|
50
|
+
assert_equal strategy.authorize_params['state'], strategy.session['omniauth.state']
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
module TokenParamsTests
|
55
|
+
extend BlockTestHelper
|
56
|
+
|
57
|
+
test 'should include any authorize params passed in the :token_params option' do
|
58
|
+
@options = { :token_params => { :foo => 'bar', :baz => 'zip' } }
|
59
|
+
assert_equal 'bar', strategy.token_params['foo']
|
60
|
+
assert_equal 'zip', strategy.token_params['baz']
|
61
|
+
end
|
62
|
+
|
63
|
+
test 'should include top-level options that are marked as :token_options' do
|
64
|
+
@options = { :token_options => [:scope, :foo], :scope => 'bar', :foo => 'baz' }
|
65
|
+
assert_equal 'bar', strategy.token_params['scope']
|
66
|
+
assert_equal 'baz', strategy.token_params['foo']
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'minitest/autorun'
|
3
|
+
require 'minitest/unit'
|
4
|
+
require 'minitest/rg'
|
5
|
+
require 'mocha/setup'
|
6
|
+
require 'omniauth/strategies/bonofa'
|
7
|
+
|
8
|
+
OmniAuth.config.test_mode = true
|
9
|
+
|
10
|
+
module BlockTestHelper
|
11
|
+
def test(name, &blk)
|
12
|
+
method_name = "test_#{name.gsub(/\s+/, '_')}"
|
13
|
+
raise "Method already defined: #{method_name}" if instance_methods.include?(method_name.to_sym)
|
14
|
+
define_method method_name, &blk
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module CustomAssertions
|
19
|
+
def assert_has_key(key, hash, msg = nil)
|
20
|
+
msg = message(msg) { "Expected #{hash.inspect} to have key #{key.inspect}" }
|
21
|
+
assert hash.has_key?(key), msg
|
22
|
+
end
|
23
|
+
|
24
|
+
def refute_has_key(key, hash, msg = nil)
|
25
|
+
msg = message(msg) { "Expected #{hash.inspect} not to have key #{key.inspect}" }
|
26
|
+
refute hash.has_key?(key), msg
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
class TestCase < Minitest::Test
|
31
|
+
extend BlockTestHelper
|
32
|
+
include CustomAssertions
|
33
|
+
end
|
34
|
+
|
35
|
+
class StrategyTestCase < TestCase
|
36
|
+
def setup
|
37
|
+
@request = stub('Request')
|
38
|
+
@request.stubs(:params).returns({})
|
39
|
+
@request.stubs(:cookies).returns({})
|
40
|
+
@request.stubs(:env).returns({})
|
41
|
+
@request.stubs(:ssl?).returns(false)
|
42
|
+
|
43
|
+
@client_id = '123'
|
44
|
+
@client_secret = '53cr3tz'
|
45
|
+
end
|
46
|
+
|
47
|
+
def strategy
|
48
|
+
@strategy ||= begin
|
49
|
+
args = [@client_id, @client_secret, @options].compact
|
50
|
+
OmniAuth::Strategies::Bonofa.new(nil, *args).tap do |strategy|
|
51
|
+
strategy.stubs(:request).returns(@request)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
Dir[File.expand_path('../support/**/*', __FILE__)].each &method(:require)
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-bonofa
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ruo
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth-oauth2
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.1.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.1.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: mocha
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: Bonofa strategy for Omniauth
|
84
|
+
email:
|
85
|
+
- siera04@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".DS_Store"
|
91
|
+
- Gemfile
|
92
|
+
- Gemfile.lock
|
93
|
+
- LICENSE.txt
|
94
|
+
- README.md
|
95
|
+
- Rakefile
|
96
|
+
- lib/omniauth-bonofa.rb
|
97
|
+
- lib/omniauth/bonofa.rb
|
98
|
+
- lib/omniauth/bonofa/configuration.rb
|
99
|
+
- lib/omniauth/bonofa/version.rb
|
100
|
+
- lib/omniauth/strategies/bonofa.rb
|
101
|
+
- omniauth-bonofa.gemspec
|
102
|
+
- tests/bonofa_test.rb
|
103
|
+
- tests/configuration_test.rb
|
104
|
+
- tests/support/shared_examples.rb
|
105
|
+
- tests/test_helper.rb
|
106
|
+
homepage: https://github.com/c7devteam/bonofa_main_omniauth
|
107
|
+
licenses:
|
108
|
+
- MIT
|
109
|
+
metadata: {}
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options: []
|
112
|
+
require_paths:
|
113
|
+
- lib
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
requirements: []
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 2.2.2
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: Bonofa strategy for Omniauth
|
130
|
+
test_files: []
|
131
|
+
has_rdoc:
|