sso-auth 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,6 +33,7 @@ module SsoAuth
33
33
 
34
34
  define_singleton_method :sso_load_and_authorize_resource do
35
35
  sso_authenticate_and_authorize
36
+ inherit_resources
36
37
  load_and_authorize_resource
37
38
  end
38
39
 
@@ -65,8 +66,10 @@ module SsoAuth
65
66
  user = User.find_by_uid(omniauth_hash[:uid])
66
67
  user ||= User.find_by_email(omniauth_hash[:info][:email]) if omniauth_hash[:info][:email].present?
67
68
  user ||= User.new { |user| user.uid = omniauth_hash[:uid] }
68
- attributes = omniauth_hash[:extra][:raw_info][:user] || {}
69
+ attributes = omniauth_hash[:extra][:raw_info][:user].dup || {}
70
+ attributes.delete(:uid)
69
71
  attributes = attributes.merge(omniauth_hash[:info])
72
+ attributes[:raw_info] = omniauth_hash[:extra][:raw_info].to_json
70
73
  attributes.each do |attribute, value|
71
74
  user.send("#{attribute}=", value) if user.respond_to?("#{attribute}=")
72
75
  end
@@ -1,3 +1,3 @@
1
1
  module SsoAuth
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sso-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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-11-20 00:00:00.000000000 Z
12
+ date: 2012-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cancan
@@ -216,7 +216,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
216
  version: '0'
217
217
  segments:
218
218
  - 0
219
- hash: 1877857579955504389
219
+ hash: -2216116779121105559
220
220
  required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  none: false
222
222
  requirements:
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  segments:
227
227
  - 0
228
- hash: 1877857579955504389
228
+ hash: -2216116779121105559
229
229
  requirements: []
230
230
  rubyforge_project:
231
231
  rubygems_version: 1.8.24