classy_cas 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/classy_cas.rb +2 -3
- data/lib/ticket_granting_ticket.rb +8 -1
- metadata +6 -6
data/lib/classy_cas.rb
CHANGED
@@ -112,9 +112,8 @@ module ClassyCAS
|
|
112
112
|
redirect "/login", 303 unless username && password && login_ticket
|
113
113
|
# Failures will throw back to self, which we've registered with Warden to handle login failures
|
114
114
|
warden.authenticate!(:scope => :cas, :action => 'unauthenticated')
|
115
|
-
|
116
|
-
tgt = TicketGrantingTicket.
|
117
|
-
tgt.save!(settings.redis)
|
115
|
+
|
116
|
+
tgt = TicketGrantingTicket.create!(username, settings.redis)
|
118
117
|
cookie = tgt.to_cookie(request.host)
|
119
118
|
response.set_cookie(*cookie)
|
120
119
|
|
@@ -5,6 +5,13 @@ class TicketGrantingTicket
|
|
5
5
|
new(username, ticket)
|
6
6
|
end
|
7
7
|
end
|
8
|
+
|
9
|
+
def create!(user, store)
|
10
|
+
tgt = self.new(user)
|
11
|
+
tgt.save!(store)
|
12
|
+
tgt
|
13
|
+
end
|
14
|
+
|
8
15
|
end
|
9
16
|
|
10
17
|
attr_reader :username
|
@@ -25,7 +32,7 @@ class TicketGrantingTicket
|
|
25
32
|
def save!(store)
|
26
33
|
store[ticket] = username
|
27
34
|
end
|
28
|
-
|
35
|
+
|
29
36
|
def to_cookie(domain, path = "/")
|
30
37
|
["tgt", {
|
31
38
|
:value => ticket,
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: classy_cas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 2
|
10
|
+
version: 0.9.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew O'Brien
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-
|
20
|
+
date: 2011-03-28 00:00:00 -03:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -200,7 +200,7 @@ files:
|
|
200
200
|
- README.textile
|
201
201
|
- config.ru
|
202
202
|
has_rdoc: true
|
203
|
-
homepage: https://
|
203
|
+
homepage: https://rubygems.org/gems/classy_cas
|
204
204
|
licenses: []
|
205
205
|
|
206
206
|
post_install_message:
|
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
231
|
requirements: []
|
232
232
|
|
233
233
|
rubyforge_project:
|
234
|
-
rubygems_version: 1.
|
234
|
+
rubygems_version: 1.6.2
|
235
235
|
signing_key:
|
236
236
|
specification_version: 3
|
237
237
|
summary: A Central Authentication Service server built on Sinatra and Redis
|