sso-auth 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sso/auth/engine.rb +12 -0
- data/lib/sso/auth/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4de8fe256c9ce031080bbd09fce280ab0b785c5
|
4
|
+
data.tar.gz: 65dcf7372a52fd0186fe257c53e6f41a8136f4c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 281bfa3241b00129f4082b845979ca67bf5d542f20e0bd632d0ae8b45ff72859eb83118fcdef4770ae4c0c39b10432632ae7cf6d5f2ffcd7aee3ce135541522a
|
7
|
+
data.tar.gz: ab6e79841efec99d55a24cf85ccc64540d86180964ebc31b749a0d364570c353c3c0c25d4c88b5562a29b3f554ba1ab0d199fe531a9cf21692aa0531a6199bb2
|
data/lib/sso/auth/engine.rb
CHANGED
@@ -84,6 +84,7 @@ module Sso
|
|
84
84
|
user.after_oauth_authentication
|
85
85
|
user
|
86
86
|
end
|
87
|
+
rewrite_devise_session_methods
|
87
88
|
end
|
88
89
|
|
89
90
|
def self.sso_auth_permission(options)
|
@@ -101,6 +102,17 @@ module Sso
|
|
101
102
|
scope :for_role, ->(role) { where(:role => role) }
|
102
103
|
scope :for_context, ->(context) { where(:context_id => context.try(:id), :context_type => context.try(:class)) }
|
103
104
|
end
|
105
|
+
|
106
|
+
define_singleton_method :rewrite_devise_session_methods do
|
107
|
+
def self.serialize_into_session(record)
|
108
|
+
[record.uid, record.authenticatable_salt]
|
109
|
+
end
|
110
|
+
|
111
|
+
def self.serialize_from_session(key, salt)
|
112
|
+
record = find_by(:uid => key)
|
113
|
+
record if record && record.authenticatable_salt == salt
|
114
|
+
end
|
115
|
+
end
|
104
116
|
end
|
105
117
|
end
|
106
118
|
end
|
data/lib/sso/auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sso-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- http://openteam.ru
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cancan
|
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
215
|
rubyforge_project:
|
216
|
-
rubygems_version: 2.2.
|
216
|
+
rubygems_version: 2.2.2
|
217
217
|
signing_key:
|
218
218
|
specification_version: 4
|
219
219
|
summary: Summary of SsoAuth.
|