omniauth-bnet 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75481f78d510d2b757de486b592b96aa9cd5eb2d
4
- data.tar.gz: 7b7771300ba046110568b834b9d6798176874023
3
+ metadata.gz: 00d6dab164c7b475aa5229f09174fc0e889ac9d0
4
+ data.tar.gz: 10be2325eedc35e0bf1a8bf80ddc99c683a682ac
5
5
  SHA512:
6
- metadata.gz: 9c0985ff01517891e62a2a4756be81595d619a380907c3cdb311cdf3eab820f3cf32a71950723ca91c8da82c35d1921c9ecb113c591b3a999e33f7f8bf806462
7
- data.tar.gz: 54f8f31cb69930851b36ed6d908896c7f785c41330c54d3ad4f8ee17ac0c47e6408aa4b57a510b4ca4d420a3380efa949f7dec684765d7f1ed0919ee37f537a3
6
+ metadata.gz: 600f0a5f8f358320561887461458f39a40198144ad5c6480d9d71ea9fee88fd95586db436bc29abcce0efe74abfe996f211dca85ab2dac944e26ccccc8d4de59
7
+ data.tar.gz: ba54add14a06a7a8c2db845045eaacc4884128f6b465a93f4224def9e5cfa201378c6bbd18acb9625f17d790c7d729c508557694d2c9708dc040c2a784969ffc
@@ -40,7 +40,7 @@ end
40
40
 
41
41
  get '/' do
42
42
  if current_user
43
- erb '<h1>Sinatra OAuth Test</h1><%=current_user%><br><pre><%=h current_user_info%></pre><br><a href="/logout">Logout</a>'
43
+ erb '<h1>Sinatra OAuth Test</h1><%=current_user%><br><pre><%=h current_user_info%></pre><br><pre><%=h session[:debug]%></pre><br><a href="/logout">Logout</a>'
44
44
  else
45
45
  erb '<h1>Sinatra OAuth Test</h1><a href="/auth/github">Login with Github</a><br><a href="/auth/bnet">Login with Bnet</a>'
46
46
  end
@@ -50,6 +50,7 @@ get '/auth/:name/callback' do
50
50
  auth = request.env["omniauth.auth"]
51
51
  session[:user_id] = auth["uid"]
52
52
  session[:user_info] = auth["info"]
53
+ session[:debug] = auth.to_yaml
53
54
  redirect OmniAuth.config.full_host
54
55
  end
55
56
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Bnet
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@ require 'base64'
4
4
  module OmniAuth
5
5
  module Strategies
6
6
  class Bnet < OmniAuth::Strategies::OAuth2
7
- option :region, :us
7
+ option :region, 'us'
8
8
  option :client_options, {
9
9
  :scope => 'wow.profile sc2.profile'
10
10
  }
@@ -54,6 +54,10 @@ module OmniAuth
54
54
 
55
55
  private
56
56
 
57
+ def callback_url
58
+ full_host + script_name + callback_path
59
+ end
60
+
57
61
  def getHost(region)
58
62
  case region
59
63
  when "cn"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-bnet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Giroir
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-02 00:00:00.000000000 Z
11
+ date: 2016-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.2.2
109
+ rubygems_version: 2.6.3
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Omniauth Strategy for Battle.net