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 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://code.google.com/p/rubycas-server)
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](http://code.google.com/p/rubycas-server/wiki/HowToSendExtraUserAttributes).
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.
@@ -8,6 +8,7 @@ module RackCAS
8
8
  end
9
9
 
10
10
  def login_url(service_url)
11
+ service_url = URL.parse(service_url).to_s
11
12
  @url.dup.append_path('login').add_params(service: service_url)
12
13
  end
13
14
 
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('/')
@@ -1,3 +1,3 @@
1
1
  module RackCAS
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
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.1
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-11-26 00:00:00.000000000 Z
12
+ date: 2012-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack