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 +4 -4
- data/README.md +1 -1
- data/lib/omniauth/strategies/bitreserve.rb +7 -4
- data/lib/omniauth-bitreserve/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f5ed8bec996240589bdb7339784c64ab2553f5
|
4
|
+
data.tar.gz: 6f46823547025de99af8e789d4eaeb6650b5f358
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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['
|
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
|
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']
|