rack-simple_auth 1.0.0rc → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/MANIFEST +26 -26
- data/README.rdoc +121 -0
- data/checksum/rack-simple_auth-1.0.0.gem.sha512 +1 -0
- data/checksum/rack-simple_auth-1.0.0rc.gem.sha512 +1 -0
- data/doc/Rack.html +128 -0
- data/doc/Rack/SimpleAuth.html +252 -0
- data/doc/Rack/SimpleAuth/HMAC.html +128 -0
- data/doc/Rack/SimpleAuth/HMAC/Config.html +1003 -0
- data/doc/Rack/SimpleAuth/HMAC/Middleware.html +1418 -0
- data/doc/Rack/SimpleAuth/Logger.html +264 -0
- data/doc/_index.html +185 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/examples/index.php +32 -0
- data/{test/rack/simple_auth/hmac/config.ru → doc/examples/rack_lobster.ru} +1 -2
- data/doc/file.README.html +221 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +221 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +179 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/rack/simple_auth.rb +3 -1
- data/lib/rack/simple_auth/hmac/config.rb +46 -8
- data/lib/rack/simple_auth/hmac/middleware.rb +102 -75
- data/lib/rack/simple_auth/logger.rb +8 -3
- data/lib/rack/simple_auth/version.rb +1 -1
- metadata +91 -105
- data/.gitignore +0 -18
- data/.rubocop.yml +0 -1
- data/.travis.yml +0 -22
- data/.yardopts +0 -1
- data/Gemfile +0 -4
- data/README.md +0 -68
- data/Rakefile +0 -8
- data/rubocop-todo.yml +0 -19
- data/task/build.rake +0 -4
- data/task/checksum.rake +0 -15
- data/task/console.rake +0 -7
- data/task/default.rake +0 -6
- data/task/floodtest.rake +0 -34
- data/task/manifest.rake +0 -8
- data/task/test.rake +0 -23
- data/test/rack/simple_auth/hmac/config_fail.ru +0 -23
- data/test/rack/simple_auth/hmac/config_fail_option.ru +0 -24
- data/test/rack/simple_auth/hmac/config_fail_run.ru +0 -22
- data/test/rack/simple_auth/hmac/config_fail_step.ru +0 -23
- data/test/rack/simple_auth/hmac/config_fail_tolerance.ru +0 -23
- data/test/rack/simple_auth/hmac/hmac_fail_run_test.rb +0 -26
- data/test/rack/simple_auth/hmac/hmac_fail_test.rb +0 -38
- data/test/rack/simple_auth/hmac/hmac_test.rb +0 -128
- data/test/test_helper.rb +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 40096c8f67c41259b34e662419464350f2ccaea7
|
4
|
+
data.tar.gz: 1ee42ec21e3b7defd704872cb5752ed02451f7a6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8a87664b0113fcc0ec50bb4256c24bda3e04c19bc8ba9f1066f02623bf274878ee8df5ebed5038031da010c5c18c806c8c7788a882a4d58c0718980c44e0ba84
|
7
|
+
data.tar.gz: b1033d3210ceccaf16cce58fc5e89f8c97fe3457fd6349c82fd81ef52404382ccc7812bc81eaea274050cf669fcb9887dc7102df6ab54082fd5c0d4c8be7317f
|
data/MANIFEST
CHANGED
@@ -1,37 +1,37 @@
|
|
1
|
-
.gitignore
|
2
|
-
.rubocop.yml
|
3
|
-
.travis.yml
|
4
|
-
.yardopts
|
5
|
-
Gemfile
|
6
1
|
LICENSE.txt
|
7
2
|
MANIFEST
|
8
|
-
README.
|
9
|
-
Rakefile
|
3
|
+
README.rdoc
|
10
4
|
checksum/rack-simple_auth-0.0.9.gem.sha512
|
11
5
|
checksum/rack-simple_auth-0.1.0.gem.sha512
|
12
6
|
checksum/rack-simple_auth-0.1.1.gem.sha512
|
13
7
|
checksum/rack-simple_auth-0.1.2.gem.sha512
|
8
|
+
checksum/rack-simple_auth-1.0.0.gem.sha512
|
9
|
+
checksum/rack-simple_auth-1.0.0rc.gem.sha512
|
10
|
+
doc/Rack.html
|
11
|
+
doc/Rack/SimpleAuth.html
|
12
|
+
doc/Rack/SimpleAuth/HMAC.html
|
13
|
+
doc/Rack/SimpleAuth/HMAC/Config.html
|
14
|
+
doc/Rack/SimpleAuth/HMAC/Middleware.html
|
15
|
+
doc/Rack/SimpleAuth/Logger.html
|
16
|
+
doc/_index.html
|
17
|
+
doc/class_list.html
|
18
|
+
doc/css/common.css
|
19
|
+
doc/css/full_list.css
|
20
|
+
doc/css/style.css
|
21
|
+
doc/examples/index.php
|
22
|
+
doc/examples/rack_lobster.ru
|
23
|
+
doc/file.README.html
|
24
|
+
doc/file_list.html
|
25
|
+
doc/frames.html
|
26
|
+
doc/index.html
|
27
|
+
doc/js/app.js
|
28
|
+
doc/js/full_list.js
|
29
|
+
doc/js/jquery.js
|
30
|
+
doc/method_list.html
|
31
|
+
doc/top-level-namespace.html
|
14
32
|
lib/rack/simple_auth.rb
|
15
33
|
lib/rack/simple_auth/hmac/config.rb
|
16
34
|
lib/rack/simple_auth/hmac/middleware.rb
|
17
35
|
lib/rack/simple_auth/logger.rb
|
18
36
|
lib/rack/simple_auth/version.rb
|
19
|
-
rack-simple_auth.gemspec
|
20
|
-
rubocop-todo.yml
|
21
|
-
task/build.rake
|
22
|
-
task/checksum.rake
|
23
|
-
task/console.rake
|
24
|
-
task/default.rake
|
25
|
-
task/floodtest.rake
|
26
|
-
task/manifest.rake
|
27
|
-
task/test.rake
|
28
|
-
test/rack/simple_auth/hmac/config.ru
|
29
|
-
test/rack/simple_auth/hmac/config_fail.ru
|
30
|
-
test/rack/simple_auth/hmac/config_fail_option.ru
|
31
|
-
test/rack/simple_auth/hmac/config_fail_run.ru
|
32
|
-
test/rack/simple_auth/hmac/config_fail_step.ru
|
33
|
-
test/rack/simple_auth/hmac/config_fail_tolerance.ru
|
34
|
-
test/rack/simple_auth/hmac/hmac_fail_run_test.rb
|
35
|
-
test/rack/simple_auth/hmac/hmac_fail_test.rb
|
36
|
-
test/rack/simple_auth/hmac/hmac_test.rb
|
37
|
-
test/test_helper.rb
|
37
|
+
rack-simple_auth.gemspec
|
data/README.rdoc
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
= What is Rack::SimpleAuth
|
2
|
+
|
3
|
+
Rack::SimpleAuth will contain different Authentication Class Middlewares
|
4
|
+
|
5
|
+
Until now only HMAC is implemented...
|
6
|
+
|
7
|
+
== Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
$ gem 'rack-simple_auth'
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install rack-simple_auth
|
20
|
+
|
21
|
+
== Gem Status
|
22
|
+
|
23
|
+
{<img src="https://travis-ci.org/Benny1992/rack-simple_auth.svg?branch=v1.0.0rc" alt="Build Status" />}[https://travis-ci.org/Benny1992/rack-simple_auth]
|
24
|
+
{<img src="https://coveralls.io/repos/Benny1992/rack-simple_auth/badge.png" alt="Code Coverage" />}[https://coveralls.io/r/Benny1992/rack-simple_auth]
|
25
|
+
{<img src="https://badge.fury.io/rb/rack-simple_auth.png" alt="Gem Version" />}[http://badge.fury.io/rb/rack-simple_auth]
|
26
|
+
{<img src="https://gemnasium.com/Benny1992/rack-simple_auth.png" alt="Dependency Status" />}[https://gemnasium.com/Benny1992/rack-simple_auth]
|
27
|
+
{<img src="https://www.codeship.io/projects/f2d9d790-b0fe-0131-3fd5-025f180094b5/status" alt="Build Status" />}[https://www.codeship.io/projects/f2d9d790-b0fe-0131-3fd5-025f180094b5/status]
|
28
|
+
|
29
|
+
== Usage
|
30
|
+
|
31
|
+
=== HMAC
|
32
|
+
|
33
|
+
To use HMAC Authorization you have to use the Rack::SimpleAuth::HMAC::Middleware for your Rack App
|
34
|
+
|
35
|
+
Basic Usage:
|
36
|
+
|
37
|
+
require 'rack/lobster'
|
38
|
+
require 'rack/simple_auth'
|
39
|
+
|
40
|
+
request_config = {
|
41
|
+
'GET' => 'path',
|
42
|
+
'POST' => 'params',
|
43
|
+
'DELETE' => 'path',
|
44
|
+
'PUT' => 'path',
|
45
|
+
'PATCH' => 'path'
|
46
|
+
}
|
47
|
+
|
48
|
+
use Rack::SimpleAuth::HMAC::Middleware do |options|
|
49
|
+
options.tolerance = 1500 # 1500ms -> 1.5s
|
50
|
+
|
51
|
+
options.secret = 'test_secret'
|
52
|
+
options.signature = 'test_signature'
|
53
|
+
|
54
|
+
options.logpath = "#{File.expand_path('..', __FILE__)}/logs"
|
55
|
+
options.request_config = request_config
|
56
|
+
end
|
57
|
+
|
58
|
+
run Rack::Lobster.new
|
59
|
+
|
60
|
+
In general each request has a message (which is encrypted) in following format:
|
61
|
+
|
62
|
+
{ 'method' => @request.request_method, 'date' => date, 'data' => request_data }.to_json
|
63
|
+
|
64
|
+
For example accessing +GET /test+ with this configuration represents following message
|
65
|
+
|
66
|
+
{ 'method' => 'GET', 'date' => 1398821451494, 'data' => '/test' }.to_json
|
67
|
+
|
68
|
+
|
69
|
+
With the tolerance there is an adjustable amount of messages wich are built (Rack::SimpleAuth::HMAC::Middleware#allowed_messages)
|
70
|
+
|
71
|
+
This means a request could have a certain latency (delay) and the request is still authorized
|
72
|
+
|
73
|
+
|
74
|
+
==== Secure your REST Api:
|
75
|
+
|
76
|
+
To secure your REST Api you have to send the HTTP_AUTHORIZATION Header with each request where the HMAC Middleware is used.
|
77
|
+
|
78
|
+
For example +POST /form+ with params +{ name => benny1992 }+ is secured the following way:
|
79
|
+
|
80
|
+
Uncrypted Message:
|
81
|
+
|
82
|
+
{ 'method' => 'POST', 'date' => timestamp +- tolerance, 'data' => { 'name' => 'benny1992' } }.to_json
|
83
|
+
|
84
|
+
Encryption Mechanism:
|
85
|
+
|
86
|
+
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), @config.secret, message(date, i))
|
87
|
+
|
88
|
+
where @config.secret represents your secret which was set in the middleware dsl block and message represents the uncrypted message
|
89
|
+
for the specific timestamp(date) and delay(i)
|
90
|
+
|
91
|
+
===== Therefore you need following encryption mechanism on the client side (pseudocode):
|
92
|
+
|
93
|
+
encrypted_message = OpenSSL::HMAC.hexdigest(OpenSSL:Digest.new('sha256'), 'test_secret', message)
|
94
|
+
|
95
|
+
HTTP_AUTHORIZATION = encrypted_message:'test_signature'
|
96
|
+
|
97
|
+
===== Time formats
|
98
|
+
|
99
|
+
The timestamp and tolerance are in millisecond format:
|
100
|
+
|
101
|
+
In Ruby land this means:
|
102
|
+
|
103
|
+
(Time.now.to_f * 1000).to_i
|
104
|
+
|
105
|
+
For PHP you have to use +round()+ and +microtime()+ :
|
106
|
+
|
107
|
+
round(microtime(true) * 1000)
|
108
|
+
|
109
|
+
===== General your timestamp should only contain 13 digits and NO floating part
|
110
|
+
|
111
|
+
==== Examples
|
112
|
+
|
113
|
+
Examples can be found in doc/examples
|
114
|
+
|
115
|
+
== Contributing
|
116
|
+
|
117
|
+
1. Fork it ( http://github.com/benny1992/rack-simple_auth/fork )
|
118
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
119
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
120
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
121
|
+
5. Create new Pull Request
|
@@ -0,0 +1 @@
|
|
1
|
+
b88704d60bd82de20893861f9d524a8a0d433c7af1b21501d9e69fc6da5a847455c86e01e83743439a5bd46fc9feb66a4371f9c9560f08f8d9de60fdf649dc2b
|
@@ -0,0 +1 @@
|
|
1
|
+
4c0a5c5b86c0f88193dc9e343334737e709eb69397b6a2dd5a1e76a18d867a79db76cd7e205ad054d1580cdfd28ccb9a81a3f5a1969f77f988d3449f09ee296f
|
data/doc/Rack.html
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Module: Rack
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!Rack.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (R)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Rack</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Module: Rack
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
82
|
+
<dd class="r1 last">lib/rack/simple_auth.rb<span class="defines">,<br />
|
83
|
+
lib/rack/simple_auth/logger.rb,<br /> lib/rack/simple_auth/version.rb,<br /> lib/rack/simple_auth/hmac/config.rb,<br /> lib/rack/simple_auth/hmac/middleware.rb</span>
|
84
|
+
</dd>
|
85
|
+
|
86
|
+
</dl>
|
87
|
+
<div class="clear"></div>
|
88
|
+
|
89
|
+
<h2>Overview</h2><div class="docstring">
|
90
|
+
<div class="discussion">
|
91
|
+
|
92
|
+
<p>Rack Module</p>
|
93
|
+
|
94
|
+
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
<div class="tags">
|
98
|
+
|
99
|
+
|
100
|
+
</div><h2>Defined Under Namespace</h2>
|
101
|
+
<p class="children">
|
102
|
+
|
103
|
+
|
104
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Rack/SimpleAuth.html" title="Rack::SimpleAuth (module)">SimpleAuth</a></span>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
</p>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<div id="footer">
|
122
|
+
Generated on Wed Apr 30 09:50:21 2014 by
|
123
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
124
|
+
0.8.7.4 (ruby-2.1.1).
|
125
|
+
</div>
|
126
|
+
|
127
|
+
</body>
|
128
|
+
</html>
|
@@ -0,0 +1,252 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Module: Rack::SimpleAuth
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!Rack/SimpleAuth.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (S)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Rack.html" title="Rack (module)">Rack</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">SimpleAuth</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Module: Rack::SimpleAuth
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
82
|
+
<dd class="r1 last">lib/rack/simple_auth.rb<span class="defines">,<br />
|
83
|
+
lib/rack/simple_auth/logger.rb,<br /> lib/rack/simple_auth/version.rb,<br /> lib/rack/simple_auth/hmac/config.rb,<br /> lib/rack/simple_auth/hmac/middleware.rb</span>
|
84
|
+
</dd>
|
85
|
+
|
86
|
+
</dl>
|
87
|
+
<div class="clear"></div>
|
88
|
+
|
89
|
+
<h2>Overview</h2><div class="docstring">
|
90
|
+
<div class="discussion">
|
91
|
+
|
92
|
+
<p>Module which Contains different Authorization / Authentication Classes
|
93
|
+
(HMAC, ..)</p>
|
94
|
+
|
95
|
+
|
96
|
+
</div>
|
97
|
+
</div>
|
98
|
+
<div class="tags">
|
99
|
+
|
100
|
+
|
101
|
+
</div><h2>Defined Under Namespace</h2>
|
102
|
+
<p class="children">
|
103
|
+
|
104
|
+
|
105
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="SimpleAuth/HMAC.html" title="Rack::SimpleAuth::HMAC (module)">HMAC</a></span>, <span class='object_link'><a href="SimpleAuth/Logger.html" title="Rack::SimpleAuth::Logger (module)">Logger</a></span>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
</p>
|
111
|
+
|
112
|
+
<h2>Constant Summary</h2>
|
113
|
+
|
114
|
+
<dl class="constants">
|
115
|
+
|
116
|
+
<dt id="VERSION-constant" class="">VERSION =
|
117
|
+
<div class="docstring">
|
118
|
+
<div class="discussion">
|
119
|
+
|
120
|
+
<p>Current Gem Version</p>
|
121
|
+
|
122
|
+
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
<div class="tags">
|
126
|
+
|
127
|
+
|
128
|
+
</div>
|
129
|
+
</dt>
|
130
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.0.0</span><span class='tstring_end'>'</span></span></pre></dd>
|
131
|
+
|
132
|
+
</dl>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<h2>
|
143
|
+
Class Method Summary
|
144
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
145
|
+
</h2>
|
146
|
+
|
147
|
+
<ul class="summary">
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#root-class_method" title="root (class method)">+ (String) <strong>root</strong> </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
<span class="summary_desc"><div class='inline'>
|
167
|
+
<p>Method to return Gem Root Dir from everywhere in the gem.</p>
|
168
|
+
</div></span>
|
169
|
+
|
170
|
+
</li>
|
171
|
+
|
172
|
+
|
173
|
+
</ul>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<div id="class_method_details" class="method_details_list">
|
179
|
+
<h2>Class Method Details</h2>
|
180
|
+
|
181
|
+
|
182
|
+
<div class="method_details first">
|
183
|
+
<h3 class="signature first" id="root-class_method">
|
184
|
+
|
185
|
+
+ (<tt>String</tt>) <strong>root</strong>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</h3><div class="docstring">
|
192
|
+
<div class="discussion">
|
193
|
+
|
194
|
+
<p>Method to return Gem Root Dir from everywhere in the gem</p>
|
195
|
+
|
196
|
+
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
<div class="tags">
|
200
|
+
|
201
|
+
<p class="tag_title">Returns:</p>
|
202
|
+
<ul class="return">
|
203
|
+
|
204
|
+
<li>
|
205
|
+
|
206
|
+
|
207
|
+
<span class='type'>(<tt>String</tt>)</span>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
—
|
212
|
+
<div class='inline'>
|
213
|
+
<p>Gem Root Folder</p>
|
214
|
+
</div>
|
215
|
+
|
216
|
+
</li>
|
217
|
+
|
218
|
+
</ul>
|
219
|
+
|
220
|
+
</div><table class="source_code">
|
221
|
+
<tr>
|
222
|
+
<td>
|
223
|
+
<pre class="lines">
|
224
|
+
|
225
|
+
|
226
|
+
19
|
227
|
+
20
|
228
|
+
21</pre>
|
229
|
+
</td>
|
230
|
+
<td>
|
231
|
+
<pre class="code"><span class="info file"># File 'lib/rack/simple_auth.rb', line 19</span>
|
232
|
+
|
233
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_root'>root</span>
|
234
|
+
<span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>..</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
235
|
+
<span class='kw'>end</span></pre>
|
236
|
+
</td>
|
237
|
+
</tr>
|
238
|
+
</table>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
</div>
|
242
|
+
|
243
|
+
</div>
|
244
|
+
|
245
|
+
<div id="footer">
|
246
|
+
Generated on Wed Apr 30 09:50:21 2014 by
|
247
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
248
|
+
0.8.7.4 (ruby-2.1.1).
|
249
|
+
</div>
|
250
|
+
|
251
|
+
</body>
|
252
|
+
</html>
|