omniauth-bitreserve 0.0.2.pre.alpha → 0.0.3.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56494e75a8b1f3321efd3818d7cb409b23d214a7
4
- data.tar.gz: a9ef0240d5336339fb5f35dea1ccd4b304ee2601
3
+ metadata.gz: f4f5ed8bec996240589bdb7339784c64ab2553f5
4
+ data.tar.gz: 6f46823547025de99af8e789d4eaeb6650b5f358
5
5
  SHA512:
6
- metadata.gz: 1467de730bab369e63720943f61231bf88d5c65b56550a590a6909812de6a63e8664917d233aa5fbfd9077b5f59f96ccb7ef099df2ee5635bcbd5e3eb6d9de04
7
- data.tar.gz: 8374723aeca3e99243ce7c72bc6f8ec46c001ad8566cc57741b03cecd575cb9b18403bbed0154b3c5b72b83f23452baaab98a9ddbaef7de459ebd950af96e21d
6
+ metadata.gz: 0939e5e3fe4ac3ae68d3ba27ae379253f8289de285abf048e92c5db048bd46bc06736d31bc1745e31236161375fd053ecd2058494b9d1d00c28b5774f03c6443
7
+ data.tar.gz: 3e1324d5f5abbb4696272a5a712a60817b2bfcb895b0c9b29165ee638412606c74bcb7604f77b613abffc8ae1283288093d0cc9c1b216ee9a49e16a3832baf4d
data/README.md CHANGED
@@ -28,7 +28,7 @@ end
28
28
 
29
29
  ## Sandbox API
30
30
 
31
- Bitreserve supports a sandbox environment for testing purposes. The API for it is located at `https://api-sandbox.bitreserve.org`. To use that, you have to override the environment variable `BITRESERVE_API_URL` with the previously mentioned URL before loading the gem. We recommend [dotenv](https://github.com/bkeepers/dotenv).
31
+ Bitreserve supports a sandbox environment for testing purposes. Authentication for the sandbox API is done via `https://sandbox.bitreserve.org`. To use that, you have to override the environment variable `BITRESERVE_CONNECT_URL` with the previously mentioned URL before loading the gem. We recommend [dotenv](https://github.com/bkeepers/dotenv).
32
32
 
33
33
  ## Contributing
34
34
 
@@ -5,11 +5,14 @@ module OmniAuth
5
5
  class Bitreserve < ::OmniAuth::Strategies::OAuth2
6
6
  include ::OmniAuth::Strategy
7
7
 
8
- URL = ENV['BITRESERVE_API_URL'] || 'https://api.bitreserve.org'
9
- PATH = '/oauth2/authorize'
10
-
8
+ URL = ENV['BITRESERVE_CONNECT_URL'] || 'https://bitreserve.org'
11
9
  option :name, :bitreserve
12
- option :client_options, site: URL, authorize_url: PATH
10
+ option :client_options, site: URL
11
+
12
+ def initialize(app, *args, &block)
13
+ super
14
+ options[:client_options][:authorize_url] = "/authorize/#{args[0]}"
15
+ end
13
16
 
14
17
  uid do
15
18
  raw_info['id']
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Bitreserve
3
- VERSION = '0.0.2-alpha'
3
+ VERSION = '0.0.3-alpha'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-bitreserve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.pre.alpha
4
+ version: 0.0.3.pre.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Palhas