rack-cas 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rack-cas/session_store/active_record.rb +5 -1
- data/lib/rack-cas/session_store/mongoid.rb +6 -2
- data/lib/rack-cas/version.rb +1 -1
- data/lib/rack/cas.rb +1 -1
- data/lib/rack/fake_cas.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a65d4abd71dea1c784a406e3ca8a042f5503eb6
|
4
|
+
data.tar.gz: 4d5cdbcdbfbf1a16cb07acc947d15b99ac2a389e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6882a52abd94f341672e8ac0e5aa2a1aaa1be4e5769f16fba6a2b8ed70a7070b61876351fbcdb6d9c15e74ce63c0118f69ad5e2ef528e68f449bb0235d834d2a
|
7
|
+
data.tar.gz: a9f768448351fdf7d5aee6357d6b94bec8c171dba878ea4201fe09ae73bc9b1a1b3eadf3a0c88366b7cc4542e8317757d4420b3ceed2b7dabb443d065d581693
|
data/README.md
CHANGED
@@ -50,7 +50,7 @@ config.rack_cas.session_store = RackCAS::ActiveRecordStore
|
|
50
50
|
Edit your `config/initializers/session_store.rb` file with the following:
|
51
51
|
```ruby
|
52
52
|
require 'rack-cas/session_store/rails/active_record'
|
53
|
-
|
53
|
+
Rails.application.config.session_store ActionDispatch::Session::RackCasActiveRecordStore
|
54
54
|
```
|
55
55
|
Run:
|
56
56
|
```ruby
|
@@ -20,7 +20,11 @@ module RackCAS
|
|
20
20
|
sid = generate_sid
|
21
21
|
data = nil
|
22
22
|
else
|
23
|
-
session = Session.where(session_id: sid).first
|
23
|
+
unless session = Session.where(session_id: sid).first
|
24
|
+
session = {}
|
25
|
+
# force generation of new sid since there is no associated session
|
26
|
+
sid = generate_sid
|
27
|
+
end
|
24
28
|
data = unpack(session['data'])
|
25
29
|
end
|
26
30
|
|
@@ -32,7 +32,11 @@ module RackCAS
|
|
32
32
|
sid = generate_sid
|
33
33
|
data = nil
|
34
34
|
else
|
35
|
-
session = Session.where(_id: sid).first
|
35
|
+
unless session = Session.where(_id: sid).first
|
36
|
+
session = {}
|
37
|
+
# force generation of new sid since there is no associated session
|
38
|
+
sid = generate_sid
|
39
|
+
end
|
36
40
|
data = unpack(session['data'])
|
37
41
|
end
|
38
42
|
|
@@ -49,7 +53,7 @@ module RackCAS
|
|
49
53
|
end
|
50
54
|
|
51
55
|
def destroy_session(env, sid, options)
|
52
|
-
|
56
|
+
Session.where(_id: sid).delete
|
53
57
|
|
54
58
|
options[:drop] ? nil : generate_sid
|
55
59
|
end
|
data/lib/rack-cas/version.rb
CHANGED
data/lib/rack/cas.rb
CHANGED
data/lib/rack/fake_cas.rb
CHANGED
@@ -25,7 +25,7 @@ class Rack::FakeCAS
|
|
25
25
|
redirect_to @request.params['service']
|
26
26
|
|
27
27
|
when '/logout'
|
28
|
-
@request.session.clear
|
28
|
+
@request.session.send respond_to?(:destroy) ? :destroy : :clear
|
29
29
|
redirect_to "#{@request.script_name}/"
|
30
30
|
|
31
31
|
# built-in way to get to the login page without needing to return a 401 status
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-cas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '1.6'
|
111
111
|
description: Simple CAS authentication for Rails, Sinatra or any Rack-based site
|
112
|
-
email: adam
|
112
|
+
email: adam@codenoble.com
|
113
113
|
executables: []
|
114
114
|
extensions: []
|
115
115
|
extra_rdoc_files: []
|
@@ -160,3 +160,4 @@ signing_key:
|
|
160
160
|
specification_version: 4
|
161
161
|
summary: Rack-based CAS client
|
162
162
|
test_files: []
|
163
|
+
has_rdoc:
|