omniauth-clio 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # OmniAuth clio
2
2
 
3
- This gem contains the clio strategy for OmniAuth. I used the omniauth-twitter gem as a template to getting this up and running. Yay open source!!
3
+ This gem contains the clio strategy for OmniAuth. I used the omniauth-harvest gem as a template to getting this up and running. Yay open source!!
4
4
 
5
- clio uses the OAuth 2.0 flow, you can read about it here: http://api-docs.goclio.com/v1/index.html#authorization-with-oauth-2-0
5
+ Clio uses the OAuth 2.0 flow, you can read about it here: http://api-docs.goclio.com/v1/index.html#authorization-with-oauth-2-0
6
6
 
7
7
  ## How To Use It
8
8
 
@@ -17,17 +17,17 @@ You can pull them in directly from github e.g.:
17
17
  Once these are in, you need to add the following to your `config/initializers/omniauth.rb` if using a rails app:
18
18
 
19
19
  Rails.application.config.middleware.use OmniAuth::Builder do
20
- provider :clio, ENV['client_key'], ENV['client_secret']
20
+ provider :clio, ENV['CLIO_CLIENT_KEY'], ENV['CLIO_CLIENT_SECRET']
21
21
  end
22
22
 
23
23
  If you are using Devise in conjunction with omniauth, add this to your devise.rb file that is generated by devise:
24
24
 
25
- config.omniauth :clio, ENV['client_key'], ENV['client_secret']
25
+ config.omniauth :clio, ENV['CLIO_CLIENT_KEY'], ENV['CLIO_CLIENT_SECRET']
26
26
 
27
27
 
28
28
  If you're just using something else that doesn't depend on Rack you can add this:
29
29
  use OmniAuth::Builder do
30
- provider :cheddar, ENV['client_key'], ENV['client_secret']
30
+ provider :cheddar, ENV['CLIO_CLIENT_KEY'], ENV['CLIO_CLIENT_SECRET']
31
31
  end
32
32
 
33
33
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Clio
3
- VERSION = "0.0.13"
3
+ VERSION = "0.0.14"
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@ require 'omniauth-oauth2'
4
4
  module OmniAuth
5
5
  module Strategies
6
6
  class Clio < OmniAuth::Strategies::OAuth2
7
- option :name, "Clio"
7
+ option :name, "clio"
8
8
 
9
9
  option :client_options, {
10
10
  :site => 'https://app.goclio.com',
@@ -34,6 +34,17 @@ module OmniAuth
34
34
  }
35
35
  client.get_token(token_params)
36
36
  end
37
+
38
+ extra do
39
+ {:raw_info => raw_info}
40
+ end
41
+
42
+ def raw_info
43
+ access_token.options[:mode] = :query
44
+ access_token.options[:param_name] = :access_token
45
+ @raw_info ||= access_token.get('https://app.goclio.com/api/v1/users/who_am_i').parsed
46
+ end
37
47
  end
38
48
  end
39
49
  end
50
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-clio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-06 00:00:00.000000000 Z
12
+ date: 2012-09-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth-oauth2