hancock 0.0.2 → 0.0.3
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/Rakefile
CHANGED
@@ -6,7 +6,7 @@ require 'spec/rake/spectask'
|
|
6
6
|
require 'cucumber/rake/task'
|
7
7
|
|
8
8
|
GEM = "hancock"
|
9
|
-
GEM_VERSION = "0.0.
|
9
|
+
GEM_VERSION = "0.0.3"
|
10
10
|
AUTHOR = ["Corey Donohoe", "Tim Carey-Smith"]
|
11
11
|
EMAIL = [ "atmos@atmos.org", "tim@spork.in" ]
|
12
12
|
HOMEPAGE = "http://github.com/atmos/hancock"
|
@@ -20,7 +20,7 @@ module Sinatra
|
|
20
20
|
session['return_to'] = trust_root
|
21
21
|
end
|
22
22
|
else
|
23
|
-
|
23
|
+
forbidden!
|
24
24
|
end
|
25
25
|
end
|
26
26
|
throw(:halt, [401, haml(:unauthenticated)]) unless session_user
|
@@ -32,6 +32,7 @@ module Sinatra
|
|
32
32
|
app.template(:unauthenticated) { sessions_template('unauthenticated') }
|
33
33
|
app.get '/sso/login' do
|
34
34
|
ensure_authenticated
|
35
|
+
redirect '/'
|
35
36
|
end
|
36
37
|
app.post '/sso/login' do
|
37
38
|
@user = ::Hancock::User.authenticate(params['email'], params['password'])
|
@@ -22,3 +22,8 @@ Feature: Logging In to an SSO Account
|
|
22
22
|
Then I should see the login form
|
23
23
|
When I login
|
24
24
|
Then I should be redirected to the sso provider root on login
|
25
|
+
Scenario: logging in with a bad return_to cookie set
|
26
|
+
Given a valid consumer and user exists
|
27
|
+
Then I login
|
28
|
+
When I request the login page
|
29
|
+
Then I should be redirected to the sso provider root
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hancock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Donohoe
|
@@ -10,7 +10,7 @@ autorequire: hancock
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-03-
|
13
|
+
date: 2009-03-21 00:00:00 -06:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|