omniauth-gocardless-oauth2 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1e1bab0d300a68663f527424504c27ed71f7608b
4
+ data.tar.gz: c9fbb704cd844c9c263f5bd8a28769e6fa5a3fac
5
+ SHA512:
6
+ metadata.gz: fcd8226f5769054f30af582411e72527f1b4d1641db459fb3d9d5d829c071b08ff626885c7aa9dc73f33775d071dac036e4a19aaf75640ab4a6e7cf530500561
7
+ data.tar.gz: 2d110a53d4ba96a4e5ea56c7f7fc0873d15611ddf3b6c57259d3ada2a718a9aa5364af528c555f242fa6ecfe0fdd3cdce2ee5718a49ce6e1868f7acf78d8f469
@@ -0,0 +1,2 @@
1
+ .DS_Store
2
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2016 Jonathan Tribouharet
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,33 @@
1
+ # OmniAuth GoCardless OAuth2
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/omniauth-gocardless-oauth2.svg)](http://badge.fury.io/rb/omniauth-gocardless-oauth2)
4
+
5
+ Strategy to authenticate [GoCardless](https://www.gocardless.com) in OmniAuth.
6
+
7
+ ## Installation
8
+
9
+ OmniAuth GoCardless OAuth2 is distributed as a gem, which is how it should be used in your app.
10
+
11
+ Include the gem in your Gemfile:
12
+
13
+ gem 'omniauth-gocardless-oauth2', '~> 1.0'
14
+
15
+ Integrate this strategy to your OmniAuth middleware.
16
+
17
+ ```ruby
18
+ Rails.application.config.middleware.use OmniAuth::Builder do
19
+ if Rails.env.production?
20
+ provider :gocardless, ENV['GOCARDLESS_KEY'], ENV['GOCARDLESS_SECRET'], scope: 'read_only', initial_view: 'login'
21
+ else
22
+ provider :gocardless, ENV['GOCARDLESS_KEY'], ENV['GOCARDLESS_SECRET'], scope: 'read_only', initial_view: 'login', client_options: { site: "https://connect-sandbox.gocardless.com" }
23
+ end
24
+ end
25
+ ```
26
+
27
+ ## Author
28
+
29
+ - [Jonathan Tribouharet](https://github.com/jonathantribouharet) ([@johntribouharet](https://twitter.com/johntribouharet))
30
+
31
+ ## License
32
+
33
+ OmniAuth GoCardless OAuth2 is released under the MIT license. See the LICENSE file for more info.
@@ -0,0 +1,2 @@
1
+ require "omniauth-gocardless-oauth2/version"
2
+ require 'omniauth/strategies/gocardless'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Gocardless
3
+ VERSION = '1.0.0'
4
+ end
5
+ end
@@ -0,0 +1,25 @@
1
+ require 'omniauth-oauth2'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class Gocardless < OmniAuth::Strategies::OAuth2
6
+
7
+ option :name, "gocardless"
8
+
9
+ option :client_options, {
10
+ :site => "https://connect.gocardless.com",
11
+ :authorize_url => '/oauth/authorize',
12
+ :token_url => '/oauth/access_token'
13
+ }
14
+
15
+ uid { access_token.params['organisation_id'] }
16
+
17
+ # Required for omniauth-oauth2 >= 1.4
18
+ # https://github.com/intridea/omniauth-oauth2/issues/81
19
+ def callback_url
20
+ full_host + script_name + callback_path
21
+ end
22
+
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path("../lib/omniauth-gocardless-oauth2/version", __FILE__)
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.name = "omniauth-gocardless-oauth2"
5
+ gem.summary = "OmniAuth Strategy for GoCardless via OAuth2"
6
+ gem.description = "OmniAuth Strategy for GoCardless via OAuth2"
7
+ gem.homepage = "https://github.com/jonathantribouharet/omniauth-gocardless-oauth2"
8
+ gem.version = OmniAuth::Gocardless::VERSION
9
+ gem.files = `git ls-files`.split("\n")
10
+ gem.require_paths = ["lib"]
11
+ gem.authors = ['Jonathan TRIBOUHARET']
12
+ gem.email = 'jonathan.tribouharet@gmail.com'
13
+ gem.license = 'MIT'
14
+ gem.platform = Gem::Platform::RUBY
15
+
16
+ gem.add_dependency 'omniauth-oauth2', '~> 1.4'
17
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-gocardless-oauth2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Jonathan TRIBOUHARET
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-09-15 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.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.4'
27
+ description: OmniAuth Strategy for GoCardless via OAuth2
28
+ email: jonathan.tribouharet@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - .gitignore
34
+ - Gemfile
35
+ - LICENSE.md
36
+ - README.md
37
+ - lib/omniauth-gocardless-oauth2.rb
38
+ - lib/omniauth-gocardless-oauth2/version.rb
39
+ - lib/omniauth/strategies/gocardless.rb
40
+ - omniauth-gocardless-oauth2.gemspec
41
+ homepage: https://github.com/jonathantribouharet/omniauth-gocardless-oauth2
42
+ licenses:
43
+ - MIT
44
+ metadata: {}
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project:
61
+ rubygems_version: 2.0.14.1
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: OmniAuth Strategy for GoCardless via OAuth2
65
+ test_files: []