omniauth-bancsabadell 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +10 -9
- data/Rakefile +2 -0
- data/lib/omniauth/bancsabadell/version.rb +1 -1
- data/lib/omniauth/strategies/bancsabadell.rb +16 -5
- data/omniauth-bancsabadell.gemspec +1 -1
- data/test_app/config/initializers/omniauth.rb +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00b1e8ebc396335ca92f3cdbbbffac7774a1e5d6
|
4
|
+
data.tar.gz: 52f37336f9d15be9388d02459ef287ba0a3e7113
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a00d11a623ae05a682f730836454af8f33ad92915b00dc2833b86e19fe86e56bc0cc21a6bd20c229cb706fce722cf5a705a76caaeeeb5acae95c9644dbaf614
|
7
|
+
data.tar.gz: 154cbdfc2bd8a5f4f6611e9ff9c8b874d7ce5c68dad79b1d43c9d7741332a8d6b2e9d76a55797d7d87022291661e4f62f52164211ccbe6031fc1f85daee407aa
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg*
|
data/Gemfile.lock
CHANGED
@@ -2,16 +2,16 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
omniauth-bancsabadell (0.1.0)
|
5
|
-
omniauth-oauth2 (~> 1.
|
5
|
+
omniauth-oauth2 (~> 1.4)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
faraday (0.9.
|
10
|
+
faraday (0.9.2)
|
11
11
|
multipart-post (>= 1.2, < 3)
|
12
|
-
hashie (3.3
|
13
|
-
jwt (1.
|
14
|
-
multi_json (1.
|
12
|
+
hashie (3.4.3)
|
13
|
+
jwt (1.5.2)
|
14
|
+
multi_json (1.11.0)
|
15
15
|
multi_xml (0.5.5)
|
16
16
|
multipart-post (2.0.0)
|
17
17
|
oauth2 (1.0.0)
|
@@ -23,15 +23,16 @@ GEM
|
|
23
23
|
omniauth (1.2.2)
|
24
24
|
hashie (>= 1.2, < 4)
|
25
25
|
rack (~> 1.0)
|
26
|
-
omniauth-oauth2 (1.
|
27
|
-
faraday (>= 0.8, < 0.10)
|
28
|
-
multi_json (~> 1.3)
|
26
|
+
omniauth-oauth2 (1.4.0)
|
29
27
|
oauth2 (~> 1.0)
|
30
28
|
omniauth (~> 1.2)
|
31
|
-
rack (1.
|
29
|
+
rack (1.6.4)
|
32
30
|
|
33
31
|
PLATFORMS
|
34
32
|
ruby
|
35
33
|
|
36
34
|
DEPENDENCIES
|
37
35
|
omniauth-bancsabadell!
|
36
|
+
|
37
|
+
BUNDLED WITH
|
38
|
+
1.10.6
|
data/Rakefile
ADDED
@@ -3,14 +3,25 @@ require 'omniauth/strategies/oauth2'
|
|
3
3
|
module OmniAuth
|
4
4
|
module Strategies
|
5
5
|
class Bancsabadell < OmniAuth::Strategies::OAuth2
|
6
|
-
|
6
|
+
def self.api_host
|
7
|
+
@api_host ||= if %w(development staging).include?(ENV['RAILS_ENV'])
|
8
|
+
'https://developers.bancsabadell.com'
|
9
|
+
else
|
10
|
+
'https://oauth.bancsabadell.com'
|
11
|
+
end
|
12
|
+
end
|
7
13
|
|
8
14
|
option :client_options, {
|
9
|
-
site:
|
10
|
-
authorize_url:
|
11
|
-
token_url:
|
15
|
+
site: api_host,
|
16
|
+
authorize_url: "#{api_host}/AuthServerBS/oauth/authorize",
|
17
|
+
token_url: "#{api_host}/AuthServerBS/oauth/token",
|
18
|
+
setup: true
|
12
19
|
}
|
13
20
|
|
21
|
+
def callback_url
|
22
|
+
full_host + script_name + callback_path # + query_string
|
23
|
+
end
|
24
|
+
|
14
25
|
def request_phase
|
15
26
|
super
|
16
27
|
end
|
@@ -19,7 +30,7 @@ module OmniAuth
|
|
19
30
|
super.merge({
|
20
31
|
response_type: :code,
|
21
32
|
client_id: options.client_id,
|
22
|
-
scope: "read
|
33
|
+
scope: "read"
|
23
34
|
})
|
24
35
|
end
|
25
36
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
silence_warnings { OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if
|
1
|
+
silence_warnings { OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if(Rails.env.development? || Rails.env.staging?)}
|
2
2
|
|
3
3
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
4
4
|
provider :bancsabadell,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-bancsabadell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert Bellonch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.4'
|
27
27
|
description:
|
28
28
|
email:
|
29
29
|
- albert@getquipu.com
|
@@ -32,10 +32,12 @@ extensions: []
|
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
34
|
- ".DS_Store"
|
35
|
+
- ".gitignore"
|
35
36
|
- CHANGELOG.md
|
36
37
|
- Gemfile
|
37
38
|
- Gemfile.lock
|
38
39
|
- README.md
|
40
|
+
- Rakefile
|
39
41
|
- lib/.DS_Store
|
40
42
|
- lib/omniauth-bancsabadell.rb
|
41
43
|
- lib/omniauth/.DS_Store
|
@@ -124,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
126
|
version: '0'
|
125
127
|
requirements: []
|
126
128
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.
|
129
|
+
rubygems_version: 2.4.5
|
128
130
|
signing_key:
|
129
131
|
specification_version: 4
|
130
132
|
summary: BancSabadell OAuth2 Strategy for OmniAuth
|