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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83270e43417a39dc8b49a1214ed0905194c08a6b
4
- data.tar.gz: a66a140997f45bb14c66053a367c1cc66a6a0986
3
+ metadata.gz: 3a65d4abd71dea1c784a406e3ca8a042f5503eb6
4
+ data.tar.gz: 4d5cdbcdbfbf1a16cb07acc947d15b99ac2a389e
5
5
  SHA512:
6
- metadata.gz: 8ad09daebe8d74b9cbad0f65e089b6fed7bebf216b23da8964fcc0d4d8f25e8ac4f0416a78c726f870f07d0cbd979a5e01e0a5e82be26f658a353cfcf2d81a74
7
- data.tar.gz: aa771bf5377a74bad5b90d473952a353c6b9e937c03b0a6bac4f5ce955446e8dcfe4bcf5e1882a51ab4a46fe453429b8032bf96101502ffe55f23ae226fa8e56
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
- YourApp::Application.config.session_store ActionDispatch::Session::RackCasActiveRecordStore
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
- session = Session.where(_id: sid).delete
56
+ Session.where(_id: sid).delete
53
57
 
54
58
  options[:drop] ? nil : generate_sid
55
59
  end
@@ -1,3 +1,3 @@
1
1
  module RackCAS
2
- VERSION = '0.12.0'
2
+ VERSION = '0.12.1'
3
3
  end
data/lib/rack/cas.rb CHANGED
@@ -38,7 +38,7 @@ class Rack::CAS
38
38
  if cas_request.logout?
39
39
  log env, 'rack-cas: Intercepting logout request.'
40
40
 
41
- request.session.clear
41
+ request.session.send respond_to?(:destroy) ? :destroy : :clear
42
42
  return redirect_to server.logout_url(request.params).to_s
43
43
  end
44
44
 
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.0
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: 2015-11-09 00:00:00.000000000 Z
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.crownoble@biola.edu
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: