rack_warden 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +2 -0
- data/Gemfile +13 -10
- data/README.md +115 -53
- data/config.ru +1 -0
- data/lib/rack_warden.rb +33 -5
- data/lib/rack_warden/app.rb +73 -58
- data/lib/rack_warden/core_patches.rb +20 -0
- data/lib/rack_warden/env.rb +27 -0
- data/lib/rack_warden/frameworks.rb +34 -36
- data/lib/rack_warden/frameworks/rack.rb +36 -0
- data/lib/rack_warden/frameworks/rails.rb +29 -9
- data/lib/rack_warden/frameworks/sinatra.rb +15 -11
- data/lib/rack_warden/helpers.rb +197 -29
- data/lib/rack_warden/mail.rb +26 -0
- data/lib/rack_warden/models.rb +79 -40
- data/lib/rack_warden/models/user.rb +180 -22
- data/lib/rack_warden/routes.rb +159 -83
- data/lib/rack_warden/sinatra/decompile.rb +127 -0
- data/lib/rack_warden/sinatra/json.rb +131 -0
- data/lib/rack_warden/sinatra/namespace.rb +285 -0
- data/lib/rack_warden/sinatra/respond_with.rb +277 -0
- data/lib/rack_warden/version.rb +1 -1
- data/lib/rack_warden/views/rw_account_widget.html.erb +8 -0
- data/lib/rack_warden/views/rw_activation.email.erb +3 -0
- data/lib/rack_warden/views/rw_admin.html.erb +7 -5
- data/lib/rack_warden/views/rw_dbinfo.html.erb +5 -4
- data/lib/rack_warden/views/rw_error.html.erb +1 -0
- data/lib/rack_warden/views/rw_flash_widget.html.erb +12 -0
- data/lib/rack_warden/views/rw_index.html.erb +1 -1
- data/lib/rack_warden/views/rw_layout.html.erb +13 -19
- data/lib/rack_warden/views/rw_layout_admin.html.erb +6 -6
- data/lib/rack_warden/views/rw_login.html.erb +18 -5
- data/lib/rack_warden/views/rw_new_user.html.erb +22 -6
- data/lib/rack_warden/views/rw_protected.xml.erb +10 -0
- data/lib/rack_warden/views/rw_session.html.erb +34 -0
- data/lib/rack_warden/warden.rb +161 -30
- data/rack_warden.gemspec +16 -13
- metadata +84 -29
@@ -1,11 +1,27 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<h3>Create Account</h3>
|
2
|
+
<p><%= @user.errors.to_yaml if @user && @user.errors %></p>
|
3
|
+
<form action="<%=url_for('/create')%>" method="post" class="rw">
|
4
|
+
<style scoped="scoped">
|
5
|
+
.rw label {font-size: .95em; color: grey; display: block;}
|
6
|
+
.rw input {font-size: 1.15em; margin-bottom: 20px; padding:7px;}
|
7
|
+
.rw .g-recaptcha {margin-bottom: 20px;}
|
8
|
+
</style>
|
9
|
+
|
10
|
+
<label for="user_email">Email</label>
|
11
|
+
<input type="text" name="user[email]" id="user_email" />
|
12
|
+
|
13
|
+
<label for="user_username">Username</label>
|
14
|
+
<input type="text" name="user[username]" id="user_username" />
|
15
|
+
|
16
|
+
<label for="user_password">Password</label>
|
17
|
+
<input type="password" name="user[password]" id="user_password" />
|
18
|
+
|
19
|
+
<label for="user_password_confirmation">Confirm password</label>
|
20
|
+
<input type="password" name="user[password_confirmation]" id="user_password_confirmation" />
|
21
|
+
|
6
22
|
<% if recaptcha_sitekey && RackWarden::User.count > 0 %>
|
7
23
|
<div class="g-recaptcha control text-control" data-sitekey="<%=recaptcha_sitekey%>"></div>
|
8
24
|
<% end %>
|
25
|
+
|
9
26
|
<input type="submit" value="Create" />
|
10
|
-
<p><%= @user.errors.to_yaml if @user && @user.errors %></p>
|
11
27
|
</form>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<p>
|
2
|
+
<h3>Session info</h3>
|
3
|
+
</p>
|
4
|
+
|
5
|
+
<p>
|
6
|
+
<b>Ruby Process:</b><br>
|
7
|
+
<%= $0 %>
|
8
|
+
<br><br>
|
9
|
+
|
10
|
+
|
11
|
+
<b>Middleware:</b><br>
|
12
|
+
<%#= TopApp.middleware %><br>
|
13
|
+
<%#= InnerApp.middleware %>
|
14
|
+
<%= settings.middleware %>
|
15
|
+
<br><br>
|
16
|
+
|
17
|
+
<b>Session:</b><br>
|
18
|
+
<%= session.to_hash.to_yaml.to_html %>
|
19
|
+
<br><br>
|
20
|
+
|
21
|
+
<b>Cookies:</b><br>
|
22
|
+
<%= env['rack.cookies'].to_yaml.to_html %>
|
23
|
+
<br><br>
|
24
|
+
|
25
|
+
<b>Ruby ENV:</b><br>
|
26
|
+
<%= ENV.to_hash.to_yaml.to_html %>
|
27
|
+
<br><br>
|
28
|
+
|
29
|
+
<b>Request env object:</b><br>
|
30
|
+
<%#= request.env.inspect.to_html %>
|
31
|
+
<br><br>
|
32
|
+
|
33
|
+
</p>
|
34
|
+
<br>
|
data/lib/rack_warden/warden.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module RackWarden
|
2
2
|
module WardenConfig
|
3
3
|
def self.included(base)
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
App.logger.warn "RW loading Warden config into #{base}"
|
5
|
+
|
6
|
+
base.instance_eval do
|
7
7
|
|
8
8
|
use Warden::Manager do |config|
|
9
9
|
# Tell Warden how to save our User info into a session.
|
@@ -17,7 +17,7 @@ module RackWarden
|
|
17
17
|
config.scope_defaults :default,
|
18
18
|
# "strategies" is an array of named methods with which to
|
19
19
|
# attempt authentication. We have to define this later.
|
20
|
-
:strategies => [:password],
|
20
|
+
:strategies => [:remember_me, :password],
|
21
21
|
# The action is a route to send the user to when
|
22
22
|
# warden.authenticate! returns a false answer. We'll show
|
23
23
|
# this route below.
|
@@ -27,34 +27,165 @@ module RackWarden
|
|
27
27
|
config.failure_app = self
|
28
28
|
end
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
30
|
+
end # self.included
|
31
|
+
end # WardenConfig
|
32
|
+
|
33
|
+
module Warden::Strategies
|
34
|
+
|
35
|
+
# TODO: Add basic-auth stragety.
|
36
|
+
# From Rack documentation - this is all you need for basic auth in Sinatra.
|
37
|
+
# use Rack::Auth::Basic, "Protected Area" do |username, password|
|
38
|
+
# username == 'foo' && password == 'bar'
|
39
|
+
# end
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
add(:password) do
|
44
|
+
#App.logger.debug "RW WardenStrategies.add(password) self #{self.class}"
|
45
|
+
|
46
|
+
def valid?
|
47
|
+
params['user'] && params['user']['username'] && params['user']['password']
|
48
|
+
end
|
49
|
+
|
50
|
+
def authenticate!
|
51
|
+
# User-class based authenticator. See below for old local-based authenticator
|
52
|
+
App.logger.debug "RW authenticate! method self #{self.class}"
|
53
|
+
App.logger.debug "RW authenticating with password"
|
54
|
+
user = User.authenticate(params['user']['username'], params['user']['password'])
|
55
|
+
if user.is_a? User
|
56
|
+
success!(user)
|
57
|
+
App.logger.warn "RW user logged in '#{user.username}'"
|
58
|
+
else
|
59
|
+
fail!("Could not login")
|
60
|
+
App.logger.warn "RW user failed regular login '#{params['user']['username']}'"
|
61
|
+
end
|
62
|
+
|
63
|
+
end # authenticate!
|
64
|
+
end # Warden::Strategies password
|
65
|
+
|
66
|
+
|
67
|
+
# Newer remember_me routine
|
68
|
+
add(:remember_me) do
|
69
|
+
def valid?
|
70
|
+
App.logger.debug "RW checking existence of remember_token cookie: #{env['rack.request.cookie_hash']['rack_warden_remember_me']}"
|
71
|
+
#env['rack.cookies']['rack_warden_remember_me']
|
72
|
+
#env['rack.request.cookie_hash']['rack_warden_remember_me']
|
73
|
+
env.remember_token
|
74
|
+
end
|
75
|
+
|
76
|
+
def authenticate!
|
77
|
+
App.logger.debug "RW authenticate!(:remember_me) self #{self.class}"
|
78
|
+
App.logger.debug "RW authenticating with rack_warden_remember_me token: #{env.remember_token}"
|
79
|
+
user = User.first(:remember_token => env.remember_token)
|
80
|
+
if user.is_a?(User) && !user.remember_token.to_s.empty?
|
81
|
+
success!(user)
|
82
|
+
App.logger.warn "RW user logged in with remember_me token '#{user.username}'"
|
83
|
+
else
|
84
|
+
App.logger.info "RW user failed remember_me token login '#{env.remember_token}'"
|
85
|
+
nil
|
86
|
+
end
|
87
|
+
end # authenticate!
|
88
|
+
end # remember_me
|
89
|
+
|
90
|
+
end # Warden::Strategies
|
38
91
|
|
39
|
-
def authenticate!
|
40
|
-
criteria = params['user']['username'] #.to_s.downcase
|
41
|
-
#user = ( User.first([{:username => '?'}, criteria]) + User.first([{:email => '?'}, criteria]) )
|
42
|
-
#user = User.first(:conditions => ['username = ? collate NOCASE or email = ? collate NOCASE', criteria, criteria]) #(username: params['user']['username'])
|
43
|
-
user = User.first(:conditions => ['username = ? or email = ?', criteria, criteria]) #(username: params['user']['username'])
|
44
92
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
93
|
+
# See http://www.rubydoc.info/github/hassox/warden/Warden/Hooks for info on callback params.
|
94
|
+
|
95
|
+
class Warden::Manager
|
96
|
+
|
97
|
+
before_failure do |env,opts|
|
98
|
+
env['REQUEST_METHOD'] = 'POST'
|
99
|
+
end
|
100
|
+
|
101
|
+
after_authentication do |user, auth, opts|
|
102
|
+
#App.logger.debug "RW after_authentication callback - self: #{self}"
|
103
|
+
#App.logger.debug "RW after_authentication callback - auth methods: #{auth.methods.sort}"
|
104
|
+
#App.logger.debug "RW after_authentication callback - opts: #{opts.inspect}"
|
105
|
+
#App.logger.debug "RW after_authentication callback - auth.manager: #{auth.manager.inspect}"
|
106
|
+
App.logger.debug "RW after_authentication callback - user: #{user.username}"
|
107
|
+
|
108
|
+
if user.is_a?(User) && (user.remember_token || auth.params['user']['remember_me'] == '1')
|
109
|
+
App.logger.debug "RW after_authenticate user.remember_me '#{user.username}'"
|
110
|
+
user.remember_me
|
111
|
+
|
112
|
+
# We have no path to response object here :(
|
113
|
+
#auth.response.set_cookie 'rack_warden_remember_me', :value => user.remember_token , :expires => user.remember_token_expires_at
|
114
|
+
# So we have to do this
|
115
|
+
auth.env.remember_token = { :value => user.remember_token , :expires => user.remember_token_expires_at } #user.remember_me # sets its remember_token attribute to some large random value and returns the value.
|
116
|
+
App.logger.debug "RW cookie set auth.env.remember_token: #{auth.env.remember_token}"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
before_logout do |user, auth, opts|
|
121
|
+
App.logger.debug "RW before_logout callback - self: #{self}"
|
122
|
+
App.logger.debug "RW before_logout callback - auth: #{auth.instance_variables}"
|
123
|
+
App.logger.debug "RW before_logout callback - opts: #{opts.inspect}"
|
124
|
+
|
125
|
+
#auth.response.set_cookie 'rack_warden_remember_me', nil
|
126
|
+
App.logger.debug "RW cookie unset 'rack_warden_remember_token': #{auth.env.remember_token}"
|
127
|
+
auth.env.remember_token = nil
|
128
|
+
|
129
|
+
user.forget_me
|
130
|
+
end
|
131
|
+
|
132
|
+
end # Warden::Manager
|
133
|
+
|
134
|
+
|
135
|
+
# # Old password strategy.
|
136
|
+
# Warden::Strategies.add(:password) do
|
137
|
+
# def valid?
|
138
|
+
# params['user'] && params['user']['username'] && params['user']['password']
|
139
|
+
# end
|
140
|
+
#
|
141
|
+
# def authenticate!
|
142
|
+
#
|
143
|
+
# # Original RackWarden authenticator. Works great, but doesn't allow extra User processing upon login.
|
144
|
+
# criteria = params['user']['username'] #.to_s.downcase
|
145
|
+
# #user = ( User.first([{:username => '?'}, criteria]) + User.first([{:email => '?'}, criteria]) )
|
146
|
+
# #user = User.first(:conditions => ['username = ? collate NOCASE or email = ? collate NOCASE', criteria, criteria]) #(username: params['user']['username'])
|
147
|
+
# user = User.first(:conditions => ['username = ? or email = ?', criteria, criteria]) #(username: params['user']['username'])
|
148
|
+
# if user.nil?
|
149
|
+
# fail!("The username you entered does not exist")
|
150
|
+
# App.logger.warn "RW user not found '#{criteria}'"
|
151
|
+
# elsif user.authenticate(params['user']['password'])
|
152
|
+
# success!(user)
|
153
|
+
# App.logger.warn "RW user logged in '#{user.username}'"
|
154
|
+
# else
|
155
|
+
# fail!("Could not log in")
|
156
|
+
# App.logger.warn "RW user failed login '#{user.username}'"
|
157
|
+
# end
|
158
|
+
#
|
159
|
+
# end # authenticate!
|
160
|
+
# end # Warden::Strategies password
|
54
161
|
|
55
162
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
163
|
+
# # Older remember_me routine.
|
164
|
+
# Warden::Strategies.add(:remember_me_old) do
|
165
|
+
# def valid?
|
166
|
+
# #env['rack.cookies']['rack_warden_remember_me']
|
167
|
+
# cookies['rack_warden_remember_me']
|
168
|
+
# end
|
169
|
+
#
|
170
|
+
# def authenticate!
|
171
|
+
# #user = User.first(:remember_token => env['rack.cookies']['rack_warden_remember_me'])
|
172
|
+
# user = User.first(:remember_token => cookies['rack_warden_remember_me'])
|
173
|
+
# #App.logger.debug "rack_warden_remember_me token: #{env['rack.cookies']['rack_warden_remember_me']}"
|
174
|
+
# App.logger.debug "rack_warden_remember_me token: #{cookies['rack_warden_remember_me']}"
|
175
|
+
# if user.is_a?(User) && user.remember_token
|
176
|
+
# success!(user)
|
177
|
+
# user.remember_me
|
178
|
+
# #cookies['rack_warden_remember_me'] = { :value => user.remember_token , :expires => user.remember_token_expires_at }
|
179
|
+
# App.logger.warn "RW user logged in with remember_me token '#{user.username}'"
|
180
|
+
# else
|
181
|
+
# fail!("Could not login with remember_me token")
|
182
|
+
# App.logger.warn "RW user failed remember_me token login '#{env['rack.cookies']['rack_warden_remember_me']}'"
|
183
|
+
# end
|
184
|
+
# end # authenticate!
|
185
|
+
# end # Warden::Strategies remember_me
|
186
|
+
|
187
|
+
#end # instance_eval
|
188
|
+
#end # self.included
|
189
|
+
end # WardenConfig
|
190
|
+
end # RackWarden
|
60
191
|
|
data/rack_warden.gemspec
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
# This breaks bundle-install
|
5
|
-
#require 'sinatra/base'
|
6
4
|
require 'rack_warden/version'
|
7
5
|
|
8
6
|
Gem::Specification.new do |spec|
|
@@ -10,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
10
8
|
spec.version = RackWarden::VERSION
|
11
9
|
spec.authors = ["William Richardson"]
|
12
10
|
spec.email = ["wbr@mac.com"]
|
13
|
-
spec.summary = %q{
|
14
|
-
spec.description = %q{A warden/sinatra mini-app providing authentication and user management for any rack-based
|
11
|
+
spec.summary = %q{Authentication and user management for any rack-based framework}
|
12
|
+
spec.description = %q{A warden/sinatra mini-app providing authentication and user management for any rack-based framework.}
|
15
13
|
spec.homepage = ""
|
16
14
|
spec.license = "MIT"
|
17
15
|
|
@@ -19,17 +17,22 @@ Gem::Specification.new do |spec|
|
|
19
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
19
|
spec.require_paths = ["lib"]
|
22
|
-
|
23
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
-
spec.add_development_dependency "tux"
|
26
|
-
spec.add_development_dependency "thin"
|
27
20
|
|
28
|
-
|
29
|
-
|
30
|
-
|
21
|
+
|
22
|
+
spec.add_dependency "backports"
|
23
|
+
spec.add_dependency "bcrypt"
|
31
24
|
spec.add_dependency "data_mapper"
|
32
|
-
spec.add_dependency "sqlite3"
|
33
25
|
spec.add_dependency "dm-sqlite-adapter"
|
26
|
+
spec.add_dependency "mail"
|
27
|
+
spec.add_dependency "multi_json"
|
28
|
+
spec.add_dependency "rack-contrib"
|
29
|
+
spec.add_dependency "rack-flash3"
|
30
|
+
spec.add_dependency "sinatra"
|
34
31
|
spec.add_dependency "warden"
|
32
|
+
|
33
|
+
|
34
|
+
spec.add_development_dependency "bundler"
|
35
|
+
spec.add_development_dependency "rake"
|
36
|
+
spec.add_development_dependency "thin"
|
37
|
+
spec.add_development_dependency "tux"
|
35
38
|
end
|
metadata
CHANGED
@@ -1,51 +1,51 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack_warden
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Richardson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: backports
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
type: :
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bcrypt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
type: :
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: data_mapper
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
|
-
type: :
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
@@ -53,13 +53,13 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: dm-sqlite-adapter
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
-
type: :
|
62
|
+
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: mail
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ! '>='
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: multi_json
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ! '>='
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rack-contrib
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ! '>='
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rack-flash3
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: sinatra
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: warden
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ! '>='
|
@@ -151,13 +151,55 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: bundler
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - ! '>='
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
|
-
type: :
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rake
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ! '>='
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: thin
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ! '>='
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ! '>='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: tux
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ! '>='
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
161
203
|
prerelease: false
|
162
204
|
version_requirements: !ruby/object:Gem::Requirement
|
163
205
|
requirements:
|
@@ -165,7 +207,7 @@ dependencies:
|
|
165
207
|
- !ruby/object:Gem::Version
|
166
208
|
version: '0'
|
167
209
|
description: A warden/sinatra mini-app providing authentication and user management
|
168
|
-
for any rack-based
|
210
|
+
for any rack-based framework.
|
169
211
|
email:
|
170
212
|
- wbr@mac.com
|
171
213
|
executables: []
|
@@ -180,22 +222,36 @@ files:
|
|
180
222
|
- config.ru
|
181
223
|
- lib/rack_warden.rb
|
182
224
|
- lib/rack_warden/app.rb
|
225
|
+
- lib/rack_warden/core_patches.rb
|
226
|
+
- lib/rack_warden/env.rb
|
183
227
|
- lib/rack_warden/frameworks.rb
|
228
|
+
- lib/rack_warden/frameworks/rack.rb
|
184
229
|
- lib/rack_warden/frameworks/rails.rb
|
185
230
|
- lib/rack_warden/frameworks/sinatra.rb
|
186
231
|
- lib/rack_warden/helpers.rb
|
232
|
+
- lib/rack_warden/mail.rb
|
187
233
|
- lib/rack_warden/models.rb
|
188
234
|
- lib/rack_warden/models/user.rb
|
189
235
|
- lib/rack_warden/routes.rb
|
236
|
+
- lib/rack_warden/sinatra/decompile.rb
|
237
|
+
- lib/rack_warden/sinatra/json.rb
|
238
|
+
- lib/rack_warden/sinatra/namespace.rb
|
239
|
+
- lib/rack_warden/sinatra/respond_with.rb
|
190
240
|
- lib/rack_warden/version.rb
|
241
|
+
- lib/rack_warden/views/rw_account_widget.html.erb
|
242
|
+
- lib/rack_warden/views/rw_activation.email.erb
|
191
243
|
- lib/rack_warden/views/rw_admin.html.erb
|
192
244
|
- lib/rack_warden/views/rw_dbinfo.html.erb
|
245
|
+
- lib/rack_warden/views/rw_error.html.erb
|
246
|
+
- lib/rack_warden/views/rw_flash_widget.html.erb
|
193
247
|
- lib/rack_warden/views/rw_index.html.erb
|
194
248
|
- lib/rack_warden/views/rw_layout.html.erb
|
195
249
|
- lib/rack_warden/views/rw_layout_admin.html.erb
|
196
250
|
- lib/rack_warden/views/rw_login.html.erb
|
197
251
|
- lib/rack_warden/views/rw_new_user.html.erb
|
198
252
|
- lib/rack_warden/views/rw_protected.html.erb
|
253
|
+
- lib/rack_warden/views/rw_protected.xml.erb
|
254
|
+
- lib/rack_warden/views/rw_session.html.erb
|
199
255
|
- lib/rack_warden/warden.rb
|
200
256
|
- rack_warden.gemspec
|
201
257
|
homepage: ''
|
@@ -221,6 +277,5 @@ rubyforge_project:
|
|
221
277
|
rubygems_version: 2.4.5
|
222
278
|
signing_key:
|
223
279
|
specification_version: 4
|
224
|
-
summary:
|
225
|
-
any rack-based app
|
280
|
+
summary: Authentication and user management for any rack-based framework
|
226
281
|
test_files: []
|