rack-cerberus 0.1.0 → 0.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/README.rdoc +9 -2
- data/cerberus.gemspec +1 -1
- data/cerberus.rb +1 -1
- data/example.ru +10 -1
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -42,6 +42,12 @@ If you want to see a concrete example, go into the Cerberus directory and run:
|
|
42
42
|
|
43
43
|
It's gonna start the example at http://localhost:9292
|
44
44
|
|
45
|
+
=== Logout
|
46
|
+
|
47
|
+
Any request to <tt>/logout</tt> on the path where the middleware is mounted will log you out.
|
48
|
+
In other words, if you put the middleware at <tt>/admin</tt>, query <tt>/admin/logout</tt> to be
|
49
|
+
logged out. Pretty simple.
|
50
|
+
|
45
51
|
=== Help
|
46
52
|
|
47
53
|
If you need some help, let's join my IRC channel: #mighub
|
@@ -50,8 +56,9 @@ If you want to help me, don't hesitate to fork that project on Github or send pa
|
|
50
56
|
|
51
57
|
=== Changelog
|
52
58
|
|
53
|
-
0.0.1 Changed Everything somehow
|
54
|
-
0.1.0 Make it possible to authenticate through GET request (for restful APIs)
|
59
|
+
0.0.1 Changed Everything somehow
|
60
|
+
0.1.0 Make it possible to authenticate through GET request (for restful APIs)
|
61
|
+
0.1.1 Documentation improvement
|
55
62
|
|
56
63
|
=== Copyright
|
57
64
|
|
data/cerberus.gemspec
CHANGED
data/cerberus.rb
CHANGED
@@ -34,7 +34,7 @@ class Cerberus
|
|
34
34
|
<form action="%s" method="post" accept-charset="utf-8">
|
35
35
|
<input type="text" name="cerberus_login" value="login" id='login'><br />
|
36
36
|
<input type="password" name="cerberus_pass" value="pass" id='pass'>
|
37
|
-
<p><input type="submit" value="LOG ME →"></p>
|
37
|
+
<p><input type="submit" value="LOG ME IN →"></p>
|
38
38
|
</form>
|
39
39
|
<script type="text/javascript" charset="utf-8">
|
40
40
|
var login = document.getElementById('login');
|
data/example.ru
CHANGED
@@ -3,7 +3,16 @@ use Rack::Session::Cookie
|
|
3
3
|
|
4
4
|
map '/' do
|
5
5
|
run lambda {|env|
|
6
|
-
body =
|
6
|
+
body = <<-EOB.strip
|
7
|
+
<html>
|
8
|
+
<head>
|
9
|
+
<title>Cerberus</title>
|
10
|
+
</head>
|
11
|
+
<body>This page is public, so you can see it. But what happens if you want to see a <a href='/secret'>Secret Page</a>? Nevertheless, I can give you access:<br /><br />
|
12
|
+
Login: <b>mario</b><br />Pass: <b>bros</b>
|
13
|
+
</body>
|
14
|
+
</html>
|
15
|
+
EOB
|
7
16
|
[200, {'Content-Type' => 'text/html'}, body]
|
8
17
|
}
|
9
18
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-cerberus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mickael Riga
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-15 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|