rack-openid 1.1.0 → 1.1.1
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/rack/openid/simple_auth.rb +11 -1
- metadata +4 -4
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rack/openid'
|
2
|
+
require 'rack/request'
|
2
3
|
|
3
4
|
module Rack #:nodoc:
|
4
5
|
class OpenID
|
@@ -26,7 +27,7 @@ module Rack #:nodoc:
|
|
26
27
|
app.call(env)
|
27
28
|
elsif successful_response?(env)
|
28
29
|
authenticate_session(env)
|
29
|
-
|
30
|
+
redirect_to requested_url(env)
|
30
31
|
else
|
31
32
|
authentication_request
|
32
33
|
end
|
@@ -55,6 +56,15 @@ module Rack #:nodoc:
|
|
55
56
|
end
|
56
57
|
end
|
57
58
|
|
59
|
+
def requested_url(env)
|
60
|
+
req = Rack::Request.new(env)
|
61
|
+
req.url
|
62
|
+
end
|
63
|
+
|
64
|
+
def redirect_to(url)
|
65
|
+
[303, {'Content-Type' => 'text/html', 'Location' => url}, []]
|
66
|
+
end
|
67
|
+
|
58
68
|
def authentication_request
|
59
69
|
[401, { OpenID::AUTHENTICATE_HEADER => www_authenticate_header }, []]
|
60
70
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-openid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joshua Peek
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-25 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|