omniauth-yconnect 0.0.4.0 → 0.0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Omniauth::Yconnect
2
+ YConnect OAuth2 Strategy for OmniAuth 1.0.
2
3
 
3
- TODO: Write a gem description
4
+ Supports the OAuth 2.0 server-side and client-side flows. Read the YConnect docs for more details:
5
+
6
+ [Yahoo!デベロッパーネットワークトップ>YConnect](http://developer.yahoo.co.jp/yconnect/)
7
+
8
+ TODO: refactoring
4
9
 
5
10
  ## Installation
6
11
 
@@ -8,17 +13,21 @@ Add this line to your application's Gemfile:
8
13
 
9
14
  gem 'omniauth-yconnect'
10
15
 
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install omniauth-yconnect
18
16
 
19
17
  ## Usage
20
-
21
- TODO: Write usage instructions here
18
+ OmniAuth::Strategies::Facebook is simply a Rack middleware. Read the OmniAuth 1.0 docs for detailed instructions: [https://github.com/intridea/omniauth](https://github.com/intridea/omniauth)
19
+
20
+ ※例を示します。scope等はドキュメントを確認してください。
21
+
22
+ Rails.application.config.middleware.use OmniAuth::Builder do
23
+ provider :facebook, ENV['YCONNECT_APPLICATION_ID'], ENV['FACEBOOK_SECRET']
24
+ :scope => %W(
25
+ openid
26
+ profile
27
+ email
28
+ address
29
+ ).join(' ')
30
+ end
22
31
 
23
32
  ## Contributing
24
33
 
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Yconnect
3
- VERSION = "0.0.4.0"
3
+ VERSION = "0.0.4.1"
4
4
  end
5
5
  end
@@ -93,6 +93,7 @@ module OmniAuth
93
93
  # Return info gathered from the v1/user/:id/profile API call
94
94
 
95
95
  def raw_info
96
+ return @raw_info if @raw_info
96
97
  # This is a public API and does not need signing or authentication
97
98
  url = "https://userinfo.yahooapis.jp/yconnect/v1/attribute"
98
99
  opts = {:headers => {'Authorization' => access_token.params["token_type"].camelize + ' ' + access_token.token}}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-yconnect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.0
4
+ version: 0.0.4.1
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: 2013-02-25 00:00:00.000000000 Z
12
+ date: 2013-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json