exvo-auth 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README +8 -0
- data/lib/exvo_auth/autonomous/http.rb +1 -0
- data/lib/exvo_auth/config.rb +19 -10
- data/lib/exvo_auth/version.rb +1 -1
- data/test/test_integration.rb +1 -0
- metadata +4 -4
data/README
CHANGED
@@ -16,6 +16,7 @@ In Rails, the relevant lines could look like this:
|
|
16
16
|
|
17
17
|
ExvoAuth::Config.client_id = "foo"
|
18
18
|
ExvoAuth::Config.client_secret = "bar"
|
19
|
+
ExvoAuth::Config.debug = true # dumps all HTTP traffic to STDERR, useful during development.
|
19
20
|
config.middleware.use ExvoAuth::Middleware
|
20
21
|
|
21
22
|
|
@@ -78,6 +79,13 @@ You have a handy methods available in controllers (and views in Rails): sign_in_
|
|
78
79
|
Inter-Application Communication
|
79
80
|
===============================
|
80
81
|
|
82
|
+
You need to have "App Authorization" created by Exvo first.
|
83
|
+
Contact us and provide following details:
|
84
|
+
|
85
|
+
* consumer_id - Id of an app that will be a consumer (this is you)
|
86
|
+
* provider_id - Id of the provider app
|
87
|
+
* scope - The tag associated with the api you want to use in the provider app
|
88
|
+
|
81
89
|
# Consumer side
|
82
90
|
|
83
91
|
consumer = ExvoAuth::Autonomous::Consumer.new(
|
data/lib/exvo_auth/config.rb
CHANGED
@@ -1,4 +1,13 @@
|
|
1
1
|
module ExvoAuth::Config
|
2
|
+
def self.debug
|
3
|
+
@@debug = false unless defined?(@@debug)
|
4
|
+
@@debug
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.debug=(debug)
|
8
|
+
@@debug = debug
|
9
|
+
end
|
10
|
+
|
2
11
|
def self.host
|
3
12
|
@@host ||= 'https://auth.exvo.com'
|
4
13
|
end
|
@@ -15,29 +24,29 @@ module ExvoAuth::Config
|
|
15
24
|
@@callback_key = callback_key
|
16
25
|
end
|
17
26
|
|
18
|
-
def self.client_id=(client_id)
|
19
|
-
@@client_id = client_id
|
20
|
-
end
|
21
|
-
|
22
27
|
def self.client_id
|
23
28
|
@@client_id ||= nil
|
24
29
|
end
|
25
30
|
|
26
|
-
def self.
|
27
|
-
@@
|
31
|
+
def self.client_id=(client_id)
|
32
|
+
@@client_id = client_id
|
28
33
|
end
|
29
34
|
|
30
35
|
def self.client_secret
|
31
36
|
@@client_secret ||= nil
|
32
37
|
end
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
@@require_ssl = require_ssl
|
38
|
+
|
39
|
+
def self.client_secret=(client_secret)
|
40
|
+
@@client_secret = client_secret
|
37
41
|
end
|
38
42
|
|
39
43
|
def self.require_ssl
|
40
44
|
@@require_ssl = true unless defined?(@@require_ssl)
|
41
45
|
@@require_ssl
|
42
46
|
end
|
47
|
+
|
48
|
+
# Set this to false during development ONLY!
|
49
|
+
def self.require_ssl=(require_ssl)
|
50
|
+
@@require_ssl = require_ssl
|
51
|
+
end
|
43
52
|
end
|
data/lib/exvo_auth/version.rb
CHANGED
data/test/test_integration.rb
CHANGED
@@ -5,6 +5,7 @@ class TestIntegration < Test::Unit::TestCase
|
|
5
5
|
ExvoAuth::Config.host = "https://staging.auth.exvo.com"
|
6
6
|
ExvoAuth::Config.client_id = "foo"
|
7
7
|
ExvoAuth::Config.client_secret = "bar"
|
8
|
+
ExvoAuth::Config.debug = true
|
8
9
|
end
|
9
10
|
|
10
11
|
test "integration with staging.auth.exvo.com" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exvo-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 53
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 7
|
10
|
+
version: 0.9.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jacek Becela
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-06 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|