rack-simple_auth 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MANIFEST +1 -22
- data/README.rdoc +1 -0
- data/checksum/rack-simple_auth-1.0.1.gem.sha512 +1 -0
- data/lib/rack/simple_auth/hmac/middleware.rb +46 -8
- data/lib/rack/simple_auth/version.rb +1 -1
- data/rack-simple_auth.gemspec +5 -0
- metadata +59 -24
- data/doc/Rack.html +0 -128
- data/doc/Rack/SimpleAuth.html +0 -252
- data/doc/Rack/SimpleAuth/HMAC.html +0 -128
- data/doc/Rack/SimpleAuth/HMAC/Config.html +0 -1003
- data/doc/Rack/SimpleAuth/HMAC/Middleware.html +0 -1418
- data/doc/Rack/SimpleAuth/Logger.html +0 -264
- data/doc/_index.html +0 -185
- data/doc/class_list.html +0 -54
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -339
- data/doc/examples/index.php +0 -32
- data/doc/examples/rack_lobster.ru +0 -22
- data/doc/file.README.html +0 -221
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -26
- data/doc/index.html +0 -221
- data/doc/js/app.js +0 -219
- data/doc/js/full_list.js +0 -178
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -179
- data/doc/top-level-namespace.html +0 -112
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2d819a55046690cef0f3dc5c307cd89a1002f43
|
4
|
+
data.tar.gz: 25953f020b66e9eb68edd681ffa4a7248bc4d312
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c428e0a51a3cf8db0fb264700ba4d2c36792197eba1f53a1481620161fff90bcb62740ea7533baa29434d14ef2e9900fd8b74bd41b89dc1996f3f5ce0eb204bd
|
7
|
+
data.tar.gz: 98f9526d6f080fb4c48333968db758d5d9575da584b804fecb6813994fc963206375a2ec167019b3201f9b46f0aa3d892e7e3dffbbd1666294e70a4c1df560fd
|
data/MANIFEST
CHANGED
@@ -7,28 +7,7 @@ checksum/rack-simple_auth-0.1.1.gem.sha512
|
|
7
7
|
checksum/rack-simple_auth-0.1.2.gem.sha512
|
8
8
|
checksum/rack-simple_auth-1.0.0.gem.sha512
|
9
9
|
checksum/rack-simple_auth-1.0.0rc.gem.sha512
|
10
|
-
|
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
|
10
|
+
checksum/rack-simple_auth-1.0.1.gem.sha512
|
32
11
|
lib/rack/simple_auth.rb
|
33
12
|
lib/rack/simple_auth/hmac/config.rb
|
34
13
|
lib/rack/simple_auth/hmac/middleware.rb
|
data/README.rdoc
CHANGED
@@ -25,6 +25,7 @@ Or install it yourself as:
|
|
25
25
|
{<img src="https://badge.fury.io/rb/rack-simple_auth.png" alt="Gem Version" />}[http://badge.fury.io/rb/rack-simple_auth]
|
26
26
|
{<img src="https://gemnasium.com/Benny1992/rack-simple_auth.png" alt="Dependency Status" />}[https://gemnasium.com/Benny1992/rack-simple_auth]
|
27
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
|
+
{<img src="https://codeclimate.com/github/Benny1992/rack-simple_auth.png" />}[https://codeclimate.com/github/Benny1992/rack-simple_auth]
|
28
29
|
|
29
30
|
== Usage
|
30
31
|
|
@@ -0,0 +1 @@
|
|
1
|
+
9c1876dcf613f7dcf680b7613f7442a947e381ceccdd1ec883df598e5d20d4485b5edfca0274a5c4f27569555b91fc49f73fd280c73d2a92b4db6b6a1ed625e7
|
@@ -60,12 +60,31 @@ module Rack
|
|
60
60
|
end
|
61
61
|
|
62
62
|
##
|
63
|
-
#
|
63
|
+
# Rack API Interface Method
|
64
64
|
#
|
65
65
|
# @param [Hash] env [Rack Env Hash which contains headers etc..]
|
66
66
|
#
|
67
67
|
def call(env)
|
68
|
+
self.dup.call!(env)
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# call! Method
|
73
|
+
#
|
74
|
+
# Using ! because this method isn't a pure function
|
75
|
+
# Creating for example @request & @allowed_messages instance variables
|
76
|
+
#
|
77
|
+
# Also this is a threadsafe approach for rack
|
78
|
+
#
|
79
|
+
# @param [Hash] env [Rack Env Hash which contains headers etc..]
|
80
|
+
#
|
81
|
+
def call!(env)
|
82
|
+
env = env.dup
|
68
83
|
@request = Rack::Request.new(env)
|
84
|
+
|
85
|
+
# This STATE is needed
|
86
|
+
# logging & authorizing have to use the exact same messages, so don't call allowed_messages 2 times
|
87
|
+
# Call it 1 time and save this state
|
69
88
|
@allowed_messages = allowed_messages
|
70
89
|
|
71
90
|
if valid_request?
|
@@ -140,7 +159,7 @@ module Rack
|
|
140
159
|
|
141
160
|
# Timestamp with milliseconds as Fixnum
|
142
161
|
date = (Time.now.to_f.freeze * 1000).to_i
|
143
|
-
(-(@config.tolerance)
|
162
|
+
(-(@config.tolerance)..0).step(1) do |i|
|
144
163
|
messages << OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), @config.secret, message(date, i))
|
145
164
|
end
|
146
165
|
|
@@ -164,12 +183,31 @@ module Rack
|
|
164
183
|
# Get Request Data specified by @config.request_config
|
165
184
|
#
|
166
185
|
# @return [String|Hash] data
|
186
|
+
#
|
187
|
+
# Note: REFACTOR this shit..
|
167
188
|
def request_data
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
189
|
+
return @request.send(@config.request_config[method].to_sym) if valid_message_type?
|
190
|
+
|
191
|
+
fail "Not a valid option #{@config.request_config[method]} - Use either params or path"
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Request method for current request
|
196
|
+
#
|
197
|
+
# @return [String] Request Method [GET|POST|PUT|DELETE|PATCH]
|
198
|
+
#
|
199
|
+
def method
|
200
|
+
@request.request_method
|
201
|
+
end
|
202
|
+
|
203
|
+
##
|
204
|
+
# Check if message type for current request is valid
|
205
|
+
#
|
206
|
+
# @return [TrueClass] if message type for current request is path or params
|
207
|
+
# @return [FalseClass] if message type is invalid
|
208
|
+
#
|
209
|
+
def valid_message_type?
|
210
|
+
@config.request_config[method] == 'path' || @config.request_config[method] == 'params'
|
173
211
|
end
|
174
212
|
|
175
213
|
##
|
@@ -180,7 +218,7 @@ module Rack
|
|
180
218
|
# - type of request
|
181
219
|
# - requested path
|
182
220
|
#
|
183
|
-
# Note: This is kinda slow under Rubinius
|
221
|
+
# Note: This is kinda slow under Rubinius
|
184
222
|
# (Rack::SimpleAuth::Logger.log has IO action, i think there are some performance issues)
|
185
223
|
#
|
186
224
|
def log
|
data/rack-simple_auth.gemspec
CHANGED
@@ -26,5 +26,10 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.6"
|
27
27
|
spec.add_development_dependency "rake", '~> 10.3'
|
28
28
|
spec.add_development_dependency "coveralls", '~> 0.7'
|
29
|
+
spec.add_development_dependency 'codeclimate-test-reporter'
|
29
30
|
spec.add_development_dependency "rack-test", '~> 0.6'
|
31
|
+
spec.add_development_dependency 'rspec', '~> 2.14.1'
|
32
|
+
|
33
|
+
spec.add_development_dependency 'minitest', '~> 5.3'
|
34
|
+
spec.add_development_dependency 'minitest-reporters'
|
30
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-simple_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benny1992
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: codeclimate-test-reporter
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rack-test
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +94,48 @@ dependencies:
|
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0.6'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.14.1
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.14.1
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: minitest
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '5.3'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '5.3'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: minitest-reporters
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
83
139
|
description: SimpleAuth HMAC authentication
|
84
140
|
email:
|
85
141
|
- r3qnbenni@gmail.com
|
@@ -96,28 +152,7 @@ files:
|
|
96
152
|
- checksum/rack-simple_auth-0.1.2.gem.sha512
|
97
153
|
- checksum/rack-simple_auth-1.0.0.gem.sha512
|
98
154
|
- checksum/rack-simple_auth-1.0.0rc.gem.sha512
|
99
|
-
-
|
100
|
-
- doc/Rack/SimpleAuth.html
|
101
|
-
- doc/Rack/SimpleAuth/HMAC.html
|
102
|
-
- doc/Rack/SimpleAuth/HMAC/Config.html
|
103
|
-
- doc/Rack/SimpleAuth/HMAC/Middleware.html
|
104
|
-
- doc/Rack/SimpleAuth/Logger.html
|
105
|
-
- doc/_index.html
|
106
|
-
- doc/class_list.html
|
107
|
-
- doc/css/common.css
|
108
|
-
- doc/css/full_list.css
|
109
|
-
- doc/css/style.css
|
110
|
-
- doc/examples/index.php
|
111
|
-
- doc/examples/rack_lobster.ru
|
112
|
-
- doc/file.README.html
|
113
|
-
- doc/file_list.html
|
114
|
-
- doc/frames.html
|
115
|
-
- doc/index.html
|
116
|
-
- doc/js/app.js
|
117
|
-
- doc/js/full_list.js
|
118
|
-
- doc/js/jquery.js
|
119
|
-
- doc/method_list.html
|
120
|
-
- doc/top-level-namespace.html
|
155
|
+
- checksum/rack-simple_auth-1.0.1.gem.sha512
|
121
156
|
- lib/rack/simple_auth.rb
|
122
157
|
- lib/rack/simple_auth/hmac/config.rb
|
123
158
|
- lib/rack/simple_auth/hmac/middleware.rb
|
data/doc/Rack.html
DELETED
@@ -1,128 +0,0 @@
|
|
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>
|
data/doc/Rack/SimpleAuth.html
DELETED
@@ -1,252 +0,0 @@
|
|
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>
|