warden 0.9.3 → 0.9.4
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/History.rdoc +4 -0
- data/lib/warden/proxy.rb +1 -0
- data/lib/warden/version.rb +1 -1
- data/spec/warden/proxy_spec.rb +12 -3
- data/warden.gemspec +2 -2
- metadata +2 -2
data/History.rdoc
CHANGED
data/lib/warden/proxy.rb
CHANGED
data/lib/warden/version.rb
CHANGED
data/spec/warden/proxy_spec.rb
CHANGED
@@ -181,9 +181,6 @@ describe Warden::Proxy do
|
|
181
181
|
app = lambda do |env|
|
182
182
|
env['rack.session']['warden.user.foo.key'] = 'foo user'
|
183
183
|
env['rack.session']['warden.user.bar.key'] = 'bar user'
|
184
|
-
env['warden'].authenticate(:pass, :scope => :foo)
|
185
|
-
env['warden'].authenticate(:pass, :scope => :bar)
|
186
|
-
env['warden'].authenticate(:password)
|
187
184
|
env['warden'].should be_authenticated(:foo)
|
188
185
|
env['warden'].should be_authenticated(:bar)
|
189
186
|
env['warden'].should_not be_authenticated # default scope
|
@@ -195,6 +192,18 @@ describe Warden::Proxy do
|
|
195
192
|
env['warden'].user(:bar).should == 'bar user'
|
196
193
|
env['warden'].user.should be_nil
|
197
194
|
end
|
195
|
+
|
196
|
+
it "should not authenticate other scopes just because the first is authenticated" do
|
197
|
+
app = lambda do |env|
|
198
|
+
env['warden'].authenticate(:pass, :scope => :foo)
|
199
|
+
env['warden'].authenticate(:invalid, :scope => :bar)
|
200
|
+
env['warden'].should be_authenticated(:foo)
|
201
|
+
env['warden'].should_not be_authenticated(:bar)
|
202
|
+
valid_response
|
203
|
+
end
|
204
|
+
env = env_with_params
|
205
|
+
setup_rack(app).call(env)
|
206
|
+
end
|
198
207
|
end
|
199
208
|
|
200
209
|
describe "authentication cache" do
|
data/warden.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{warden}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Daniel Neighman"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-23}
|
13
13
|
s.email = %q{has.sox@gmail.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warden
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Neighman
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-23 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|