hotspotlogin 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +4 -0
- data/README.rdoc +4 -0
- data/lib/hotspotlogin/app.rb +2 -1
- data/lib/hotspotlogin/config.rb +4 -0
- data/lib/hotspotlogin/constants.rb +7 -6
- data/views/_login_form.erb +5 -1
- data/views/hotspotlogin.erb +1 -0
- metadata +2 -2
data/Changelog
CHANGED
data/README.rdoc
CHANGED
@@ -61,6 +61,10 @@ All this options may be put into the YAML config file specified by --conf
|
|
61
61
|
the actual username, e.g.
|
62
62
|
http://accounts.mysite.com/?id=-USER-
|
63
63
|
|
64
|
+
--[no-]remember-credentials give users the possibility to store their credentials
|
65
|
+
within a cookie in their own computer and avoid typing
|
66
|
+
them again [enabled by default]
|
67
|
+
|
64
68
|
--custom-text <FRAGMENT.html>
|
65
69
|
|
66
70
|
--custom-footer <FRAGMENT.html>
|
data/lib/hotspotlogin/app.rb
CHANGED
@@ -122,7 +122,7 @@ module HotSpotLogin
|
|
122
122
|
|
123
123
|
if params['login'] # submit form button
|
124
124
|
#if params['UserName'] =~ /\S/ # save empty credentials as a way to reset cookie content
|
125
|
-
if params['remember_me'] == 'on'
|
125
|
+
if params['remember_me'] == 'on' and HotSpotLogin.config['remember-credentials']
|
126
126
|
%w{UserName Password}.each do |k|
|
127
127
|
if params[k]
|
128
128
|
response.set_cookie(k,
|
@@ -233,6 +233,7 @@ module HotSpotLogin
|
|
233
233
|
:interval => HotSpotLogin.config['interval'],
|
234
234
|
:signup_url => HotSpotLogin.config['signup-url'],
|
235
235
|
:my_url => HotSpotLogin.config['my-url'],
|
236
|
+
:remember_credentials => HotSpotLogin.config['remember-credentials'],
|
236
237
|
:custom_headline =>
|
237
238
|
HotSpotLogin.config['custom-headline'], # like "MyOrg Name"
|
238
239
|
:custom_text => HotSpotLogin.config['custom-text'],
|
data/lib/hotspotlogin/config.rb
CHANGED
@@ -60,6 +60,10 @@ module HotSpotLogin
|
|
60
60
|
@@config['signup-url'] = url
|
61
61
|
end
|
62
62
|
|
63
|
+
opts.on('--[no-]remember-credentials', 'allow users to save username/password in cookies') do |rcred|
|
64
|
+
@@config['remember-credentials'] = rcred
|
65
|
+
end
|
66
|
+
|
63
67
|
opts.on('--favicon FILE', 'well, favicon ;)') do |file|
|
64
68
|
@@config['favicon'] = file
|
65
69
|
end
|
@@ -1,13 +1,14 @@
|
|
1
1
|
module HotSpotLogin
|
2
2
|
|
3
|
-
VERSION = '1.4.
|
3
|
+
VERSION = '1.4.3'
|
4
4
|
|
5
5
|
DEFAULT_CONFIG = {
|
6
|
-
'listen-address'
|
7
|
-
'port'
|
8
|
-
'log-http'
|
9
|
-
'userpassword'
|
10
|
-
'interval'
|
6
|
+
'listen-address' => '0.0.0.0',
|
7
|
+
'port' => 4990,
|
8
|
+
'log-http' => false,
|
9
|
+
'userpassword' => true, # like $userpassword in hotpotlgin.(cgi|php)
|
10
|
+
'interval' => 300,
|
11
|
+
'remember-credentials' => true
|
11
12
|
}
|
12
13
|
|
13
14
|
ROOTDIR = File.join(File.dirname(File.expand_path __FILE__), '../..')
|
data/views/_login_form.erb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
<%
|
2
2
|
require 'rack/utils'
|
3
|
+
|
4
|
+
# DEBUG
|
5
|
+
# puts "remember_credentials:"
|
6
|
+
# p remember_credentials
|
3
7
|
%>
|
4
8
|
|
5
9
|
<FORM name="form1" METHOD="get" action="<%= request.path_info %>?">
|
@@ -22,7 +26,7 @@
|
|
22
26
|
<input type="submit" name="login" value="<%= t.login.you!.capitalize %>">
|
23
27
|
</td>
|
24
28
|
<td style="padding: none; text-align:right; font-style:italic; vertical-align:top; color:#444">
|
25
|
-
<%= t.remember_me.capitalize %> <input type="checkbox" checked name="remember_me" style="margin:none"
|
29
|
+
<% if remember_credentials %> <%= t.remember_me.capitalize %> <input type="checkbox" checked name="remember_me" style="margin:none"/><% end %>
|
26
30
|
</td>
|
27
31
|
</tr>
|
28
32
|
</tbody>
|
data/views/hotspotlogin.erb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hotspotlogin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: facets
|