exvo-auth 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README +48 -1
  2. data/VERSION +1 -1
  3. data/exvo-auth.gemspec +1 -1
  4. metadata +2 -2
data/README CHANGED
@@ -1 +1,48 @@
1
- gem install exvo-auth
1
+ -1. Read about OmniAuth by Intridea: http://github.com/intridea/omniauth.
2
+
3
+
4
+ 0. Obtain client_id and client_secret from Exvo.
5
+
6
+
7
+ 1. Install exvo-auth gem or add it to your Gemfile.
8
+
9
+
10
+ 2. Configure middleware(s).
11
+
12
+ There are two middlewares. Usually you will need the "Interactive" one:
13
+
14
+ ExvoAuth::Strategies::Interactive
15
+ ExvoAuth::Strategies::NonInteractive
16
+
17
+ Both middlewares need client_id and client_secret arguments.
18
+ In Rails, the relevant line could look like this:
19
+
20
+ config.middleware.use ExvoAuth::Strategies::Interactive, "client_id", "client_secret"
21
+
22
+
23
+ 3. Add routes.
24
+
25
+ The following comes from Rails config/routes.rb file:
26
+
27
+ match "/auth/failure" => "sessions#failure"
28
+ match "/auth/interactive/callback" => "sessions#create"
29
+ match "/auth/non_interactive/callback" => "sessions#create"
30
+
31
+ Failure url is called whenever there's a failure (d'oh).
32
+ You can have separate callbacks for interactive and non-interactive
33
+ callback routes but you can also route both callbacks to the same controller method
34
+ like shown above.
35
+
36
+
37
+ 4. Implement callback(s).
38
+
39
+ Sample implementation:
40
+
41
+ def create
42
+ render :text => params[:auth].inspect
43
+ end
44
+
45
+ In short: you get params[:auth]. Do what you want to do with it: store the data, create session, etc.
46
+
47
+
48
+ 5. Read the source, there are few features not mentioned in this README.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/exvo-auth.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{exvo-auth}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jacek Becela"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jacek Becela