shibboleth-rails 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +13 -0
- data/lib/shibboleth-rails/controller_additions.rb +9 -1
- data/lib/shibboleth-rails/version.rb +1 -1
- metadata +5 -4
data/README.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# shibboleth-rails
|
2
|
+
|
3
|
+
[Gem page](https://rubygems.org/gems/shibboleth-rails)
|
4
|
+
|
5
|
+
The [Shibboleth](http://shibboleth.internet2.edu/) System is a standards based, open source software package for web single sign-on across or within organizational boundaries. It allows sites to make informed authorization decisions for individual access of protected online resources in a privacy-preserving manner.
|
6
|
+
|
7
|
+
This library determines `current_user` from environmental variables set by `mod_shib` in Apache. An interface to login as any user is also provided for running in development.
|
8
|
+
|
9
|
+
|
10
|
+
### Related projects
|
11
|
+
|
12
|
+
[rack-shibboleth](https://github.com/alexcrichton/rack-shibboleth/) - nascent Rack-based implementation that works with Nginx and other non-Apache servers
|
13
|
+
|
@@ -29,12 +29,20 @@ module Shibboleth::Rails
|
|
29
29
|
session['new'] = true
|
30
30
|
if Rails.env.production?
|
31
31
|
redirect_to [request.protocol, request.host,
|
32
|
-
'/Shibboleth.sso/Login?target=', CGI.escape(
|
32
|
+
'/Shibboleth.sso/Login?target=', CGI.escape(requested_url)].join
|
33
33
|
else
|
34
34
|
redirect_to new_user_session_url, :notice => 'Login first, please.'
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
38
|
+
|
39
|
+
def requested_url
|
40
|
+
if request.respond_to?(:url)
|
41
|
+
request.url
|
42
|
+
else
|
43
|
+
request.protocol + request.host + request.request_uri
|
44
|
+
end
|
45
|
+
end
|
38
46
|
end
|
39
47
|
|
40
48
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shibboleth-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- mikegee
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-11 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|
@@ -44,6 +44,7 @@ extra_rdoc_files: []
|
|
44
44
|
files:
|
45
45
|
- .gitignore
|
46
46
|
- Gemfile
|
47
|
+
- README.md
|
47
48
|
- Rakefile
|
48
49
|
- app/controllers/user_sessions_controller.rb
|
49
50
|
- app/views/user_sessions/new.html.erb
|