rack-cas 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +4 -4
- data/lib/rack-cas/server.rb +1 -0
- data/lib/rack-cas/url.rb +9 -0
- data/lib/rack-cas/version.rb +1 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Rack-CAS
|
1
|
+
Rack-CAS [![Build Status](https://travis-ci.org/biola/rack-cas.png?branch=master)](https://travis-ci.org/biola/rack-cas)
|
2
2
|
========
|
3
3
|
Rack-CAS is simple [Rack](http://rack.github.com/) middleware to perform [CAS](http://jasig.org/cas) client authentication.
|
4
4
|
|
@@ -17,7 +17,7 @@ One of the included session stores must be used.
|
|
17
17
|
Requirements
|
18
18
|
============
|
19
19
|
* Ruby >= 1.9.2
|
20
|
-
* A working [CAS server](http://
|
20
|
+
* A working [CAS server](http://rubycas.github.com)
|
21
21
|
|
22
22
|
Installation
|
23
23
|
============
|
@@ -94,7 +94,7 @@ Once authentication with the CAS server has completed, Rack-CAS will set the fol
|
|
94
94
|
request.session['cas']['user'] #=> johndoe
|
95
95
|
request.session['cas']['extra_attributes'] #=> { 'first_name' => 'John', 'last_name' => ... }
|
96
96
|
|
97
|
-
__NOTE:__ `extra_attributes` will be an empty hash unless they've been [configured on your CAS server](
|
97
|
+
__NOTE:__ `extra_attributes` will be an empty hash unless they've been [configured on your CAS server](https://github.com/rubycas/rubycas-server/wiki/Extra-user-attributes).
|
98
98
|
|
99
99
|
Testing
|
100
100
|
=======
|
@@ -121,4 +121,4 @@ Then you can simply do the following in your integration tests in order to log i
|
|
121
121
|
fill_in 'password', with: 'any password'
|
122
122
|
click_button 'Login'
|
123
123
|
|
124
|
-
__NOTE:__ The FakeCAS middleware will authenticate any username with any password and so should never be used in production.
|
124
|
+
__NOTE:__ The FakeCAS middleware will authenticate any username with any password and so should never be used in production.
|
data/lib/rack-cas/server.rb
CHANGED
data/lib/rack-cas/url.rb
CHANGED
@@ -2,6 +2,15 @@ require 'addressable/uri'
|
|
2
2
|
|
3
3
|
module RackCAS
|
4
4
|
class URL < Addressable::URI
|
5
|
+
def self.parse(uri)
|
6
|
+
# I know this looks stupid but this seems to be the best way to get
|
7
|
+
# Addressable to replace + spaces with %20 spaces. Standardizing on %20
|
8
|
+
# should prevent service lookup issues due to encoding differences.
|
9
|
+
super.tap do |u|
|
10
|
+
u.query_values = u.query_values
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
5
14
|
def append_path(path)
|
6
15
|
self.tap do |u|
|
7
16
|
u.path = (u.path.split('/') + [path]).join('/')
|
data/lib/rack-cas/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-cas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
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-
|
12
|
+
date: 2012-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|