Sha256: 394fdafe3bddc0fe6c4d413f19e25ec40e0ce2ff3412195b6afb8898b6a799b3

Contents?: true

Size: 649 Bytes

Versions: 1

Compression:

Stored size: 649 Bytes

Contents

require 'omniauth-oauth2'

module OmniAuth
	module Strategies
		class Gocardless < OmniAuth::Strategies::OAuth2

			option :name, "gocardless"

			option :client_options, {
				:site => "https://connect.gocardless.com",
		        :authorize_url => '/oauth/authorize',
		        :token_url => '/oauth/access_token'
			}

			uid { access_token.params['organisation_id'] }

      info do
        {
          email: access_token.params['email']
        }
      end

			# Required for omniauth-oauth2 >= 1.4
			# https://github.com/intridea/omniauth-oauth2/issues/81
			def callback_url
				full_host + script_name + callback_path
			end

		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omniauth-gocardless-oauth2-1.0.1 lib/omniauth/strategies/gocardless.rb