door_mat 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/Gemfile +3 -0
- data/MIT-LICENSE +20 -0
- data/README.md +88 -0
- data/Rakefile +32 -0
- data/app/assets/javascripts/door_mat/application.js +13 -0
- data/app/assets/stylesheets/door_mat/application.css +15 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/door_mat/activities_controller.rb +106 -0
- data/app/controllers/door_mat/application_controller.rb +14 -0
- data/app/controllers/door_mat/change_password_controller.rb +32 -0
- data/app/controllers/door_mat/forgot_passwords_controller.rb +57 -0
- data/app/controllers/door_mat/manage_email_controller.rb +61 -0
- data/app/controllers/door_mat/password_less_session_controller.rb +121 -0
- data/app/controllers/door_mat/reconfirm_password_controller.rb +27 -0
- data/app/controllers/door_mat/sessions_controller.rb +17 -0
- data/app/controllers/door_mat/sign_in_controller.rb +60 -0
- data/app/controllers/door_mat/sign_up_controller.rb +59 -0
- data/app/controllers/door_mat/static_controller.rb +5 -0
- data/app/mailers/door_mat/activity_mailer.rb +18 -0
- data/app/mailers/door_mat/password_less_session_mailer.rb +12 -0
- data/app/models/door_mat/access_token.rb +315 -0
- data/app/models/door_mat/activity.rb +14 -0
- data/app/models/door_mat/activity_confirm_email.rb +45 -0
- data/app/models/door_mat/activity_download_recovery_key.rb +30 -0
- data/app/models/door_mat/activity_reset_password.rb +47 -0
- data/app/models/door_mat/actor.rb +149 -0
- data/app/models/door_mat/change_password.rb +12 -0
- data/app/models/door_mat/email.rb +58 -0
- data/app/models/door_mat/forgot_password.rb +12 -0
- data/app/models/door_mat/membership.rb +42 -0
- data/app/models/door_mat/session.rb +315 -0
- data/app/models/door_mat/sign_in.rb +31 -0
- data/app/models/door_mat/sign_up.rb +17 -0
- data/app/views/door_mat/activity_mailer/confirm_email.html.erb +11 -0
- data/app/views/door_mat/activity_mailer/confirm_email.text.erb +7 -0
- data/app/views/door_mat/activity_mailer/reset_password.html.erb +11 -0
- data/app/views/door_mat/activity_mailer/reset_password.text.erb +7 -0
- data/app/views/door_mat/change_password/new.html.erb +22 -0
- data/app/views/door_mat/forgot_passwords/choose_new_password.html.erb +34 -0
- data/app/views/door_mat/forgot_passwords/new.html.erb +14 -0
- data/app/views/door_mat/helpers/_errors_if_any.html.erb +10 -0
- data/app/views/door_mat/manage_email/new.html.erb +14 -0
- data/app/views/door_mat/password_less_session/access_token.html.erb +16 -0
- data/app/views/door_mat/password_less_session/new.html.erb +34 -0
- data/app/views/door_mat/password_less_session_mailer/send_token.html.erb +11 -0
- data/app/views/door_mat/password_less_session_mailer/send_token.text.erb +7 -0
- data/app/views/door_mat/reconfirm_password/new.html.erb +12 -0
- data/app/views/door_mat/sign_in/new.html.erb +30 -0
- data/app/views/door_mat/sign_up/new.html.erb +24 -0
- data/app/views/door_mat/static/add_email_success.html.erb +5 -0
- data/app/views/door_mat/static/change_password_success.html.erb +2 -0
- data/app/views/door_mat/static/confirm_email_success.html.erb +2 -0
- data/app/views/door_mat/static/email_confirmation_required.html.erb +17 -0
- data/app/views/door_mat/static/forgot_password_verification_mail_sent.html.erb +2 -0
- data/app/views/door_mat/static/reconfirm_password_success.html.erb +4 -0
- data/app/views/door_mat/static/sign_in_success.html.erb +5 -0
- data/app/views/door_mat/static/sign_out_success.html.erb +5 -0
- data/app/views/door_mat/static/sign_up_success.html.erb +4 -0
- data/bin/rails +12 -0
- data/config/locales/en.yml +73 -0
- data/config/routes.rb +48 -0
- data/db/migrate/20140616234935_create_door_mat_actors.rb +23 -0
- data/db/migrate/20140617233357_create_door_mat_sessions.rb +17 -0
- data/db/migrate/20140630043202_create_door_mat_emails.rb +12 -0
- data/db/migrate/20140702045729_create_door_mat_activities.rb +14 -0
- data/db/migrate/20141115183045_create_door_mat_access_tokens.rb +17 -0
- data/db/migrate/20141121191824_create_door_mat_memberships.rb +14 -0
- data/db/migrate/20150910182126_rename_session_guid_column.rb +5 -0
- data/db/migrate/20150918210831_add_access_token_rating_column.rb +5 -0
- data/door_mat.gemspec +37 -0
- data/lib/door_mat.rb +20 -0
- data/lib/door_mat/attr_asymmetric_store.rb +82 -0
- data/lib/door_mat/attr_symmetric_store.rb +82 -0
- data/lib/door_mat/configuration.rb +193 -0
- data/lib/door_mat/controller.rb +117 -0
- data/lib/door_mat/crypto.rb +49 -0
- data/lib/door_mat/crypto/asymmetric_store.rb +77 -0
- data/lib/door_mat/crypto/fast_hash.rb +17 -0
- data/lib/door_mat/crypto/password_hash.rb +39 -0
- data/lib/door_mat/crypto/secure_compare.rb +23 -0
- data/lib/door_mat/crypto/symmetric_store.rb +68 -0
- data/lib/door_mat/engine.rb +23 -0
- data/lib/door_mat/process/actor_password_change.rb +65 -0
- data/lib/door_mat/process/actor_sign_in.rb +38 -0
- data/lib/door_mat/process/actor_sign_up.rb +39 -0
- data/lib/door_mat/process/create_new_anonymous_actor.rb +36 -0
- data/lib/door_mat/process/manage_email.rb +42 -0
- data/lib/door_mat/process/reset_password.rb +50 -0
- data/lib/door_mat/regex.rb +17 -0
- data/lib/door_mat/test_helper.rb +58 -0
- data/lib/door_mat/url_protocol.rb +9 -0
- data/lib/door_mat/version.rb +3 -0
- data/lib/tasks/door_mat_tasks.rake +31 -0
- data/spec/controllers/door_mat/activities_controller_spec.rb +70 -0
- data/spec/controllers/door_mat/forgot_passwords_controller_spec.rb +57 -0
- data/spec/controllers/door_mat/manage_email_spec.rb +181 -0
- data/spec/controllers/door_mat/password_less_session_controller_spec.rb +344 -0
- data/spec/controllers/door_mat/sign_in_controller_spec.rb +211 -0
- data/spec/controllers/door_mat/sign_up_controller_spec.rb +90 -0
- data/spec/factories/door_mat_access_tokens.rb +6 -0
- data/spec/factories/door_mat_activitiess.rb +6 -0
- data/spec/factories/door_mat_actors.rb +23 -0
- data/spec/factories/door_mat_emails.rb +14 -0
- data/spec/factories/door_mat_memberships.rb +6 -0
- data/spec/factories/door_mat_sessions.rb +24 -0
- data/spec/features/password_less_session_spec.rb +165 -0
- data/spec/features/remember_me_spec.rb +672 -0
- data/spec/features/session_spec.rb +336 -0
- data/spec/lib/attr_store_spec.rb +237 -0
- data/spec/lib/crypto_spec.rb +130 -0
- data/spec/lib/process_spec.rb +159 -0
- data/spec/models/door_mat/access_token_spec.rb +134 -0
- data/spec/models/door_mat/activity_spec.rb +38 -0
- data/spec/models/door_mat/actor_spec.rb +56 -0
- data/spec/models/door_mat/email_spec.rb +25 -0
- data/spec/models/door_mat/session_spec.rb +69 -0
- data/spec/spec_helper.rb +223 -0
- data/spec/support/timecop/timecop_helper.rb +52 -0
- data/spec/test_app/README.rdoc +28 -0
- data/spec/test_app/Rakefile +6 -0
- data/spec/test_app/app/assets/javascripts/application.js +13 -0
- data/spec/test_app/app/assets/stylesheets/application.css +15 -0
- data/spec/test_app/app/controllers/account_controller.rb +28 -0
- data/spec/test_app/app/controllers/application_controller.rb +10 -0
- data/spec/test_app/app/controllers/password_less_sample_controller.rb +56 -0
- data/spec/test_app/app/controllers/static_controller.rb +7 -0
- data/spec/test_app/app/helpers/account_helper.rb +2 -0
- data/spec/test_app/app/helpers/application_helper.rb +2 -0
- data/spec/test_app/app/models/game.rb +62 -0
- data/spec/test_app/app/models/shared_data.rb +4 -0
- data/spec/test_app/app/models/shared_key.rb +8 -0
- data/spec/test_app/app/models/user_detail.rb +7 -0
- data/spec/test_app/app/views/account/show.html.erb +133 -0
- data/spec/test_app/app/views/door_mat/static/sign_out_success.html.erb +7 -0
- data/spec/test_app/app/views/layouts/application.html.erb +20 -0
- data/spec/test_app/app/views/password_less_sample/draw_results.html.erb +6 -0
- data/spec/test_app/app/views/password_less_sample/final_result.html.erb +7 -0
- data/spec/test_app/app/views/password_less_sample/play_game.html.erb +5 -0
- data/spec/test_app/app/views/password_less_sample/show_loosing_door.html.erb +10 -0
- data/spec/test_app/app/views/static/index.html.erb +12 -0
- data/spec/test_app/app/views/static/only_confirmed_email_allowed.html.erb +10 -0
- data/spec/test_app/app/views/static/page_that_require_password_reconfirmation.html.erb +16 -0
- data/spec/test_app/app/views/static/session_protected_page.html.erb +32 -0
- data/spec/test_app/bin/bundle +3 -0
- data/spec/test_app/bin/rails +4 -0
- data/spec/test_app/bin/rake +4 -0
- data/spec/test_app/config.ru +4 -0
- data/spec/test_app/config/application.rb +29 -0
- data/spec/test_app/config/boot.rb +5 -0
- data/spec/test_app/config/database.yml +25 -0
- data/spec/test_app/config/environment.rb +19 -0
- data/spec/test_app/config/environments/development.rb +50 -0
- data/spec/test_app/config/environments/production.rb +83 -0
- data/spec/test_app/config/environments/test.rb +48 -0
- data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
- data/spec/test_app/config/initializers/door_mat.rb +72 -0
- data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/test_app/config/initializers/inflections.rb +16 -0
- data/spec/test_app/config/initializers/mime_types.rb +4 -0
- data/spec/test_app/config/initializers/session_store.rb +3 -0
- data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/test_app/config/locales/en.yml +23 -0
- data/spec/test_app/config/routes.rb +42 -0
- data/spec/test_app/config/secrets.yml +31 -0
- data/spec/test_app/db/migrate/20140717182813_create_user_details.rb +10 -0
- data/spec/test_app/db/migrate/20140908225256_create_shared_data.rb +10 -0
- data/spec/test_app/db/migrate/20140908225604_create_shared_keys.rb +11 -0
- data/spec/test_app/db/migrate/20141121190714_create_games.rb +10 -0
- data/spec/test_app/public/404.html +67 -0
- data/spec/test_app/public/422.html +67 -0
- data/spec/test_app/public/500.html +66 -0
- data/spec/test_app/public/favicon.ico +0 -0
- metadata +552 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
module DoorMat
|
2
|
+
class SignIn
|
3
|
+
|
4
|
+
include ActiveModel::Model
|
5
|
+
|
6
|
+
attr_accessor :email, :password, :is_public, :remember_me
|
7
|
+
|
8
|
+
validates_format_of :email, with: DoorMat::Regex.simple_email
|
9
|
+
validates :password, length: { minimum: 1 }
|
10
|
+
|
11
|
+
def initialize(attributes={})
|
12
|
+
super
|
13
|
+
|
14
|
+
@is_public = '1' if @is_public.nil?
|
15
|
+
@remember_me = '0' if @remember_me.nil?
|
16
|
+
end
|
17
|
+
|
18
|
+
def is_public?
|
19
|
+
'1' == @is_public
|
20
|
+
end
|
21
|
+
|
22
|
+
def remember_me?
|
23
|
+
'1' == @remember_me
|
24
|
+
end
|
25
|
+
|
26
|
+
def add_generic_error_msg
|
27
|
+
self.errors[:base] << I18n.t("door_mat.sign_in.failed")
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module DoorMat
|
2
|
+
class SignUp
|
3
|
+
|
4
|
+
include ActiveModel::Model
|
5
|
+
|
6
|
+
attr_accessor :email, :password, :password_confirmation
|
7
|
+
|
8
|
+
validates_format_of :email, with: DoorMat::Regex.simple_email
|
9
|
+
validates :password, length: { minimum: 1 }
|
10
|
+
validates :password, confirmation: true
|
11
|
+
|
12
|
+
def add_generic_error_msg
|
13
|
+
self.errors[:base] << I18n.t("door_mat.sign_up.failed")
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p>To confirm your email, please visit the URL below</p>
|
2
|
+
|
3
|
+
<p>This email body is a DoorMat placeholder, override it with app/views/door_mat/activity_mailer/confirm_email.html.erb in your application.</p>
|
4
|
+
|
5
|
+
<ul>
|
6
|
+
<% @parameters.keys.each do |key| %>
|
7
|
+
<li>
|
8
|
+
<%= key %> -> <%= @parameters[key] %>
|
9
|
+
</li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
To confirm your email, please visit the URL below
|
2
|
+
|
3
|
+
This email body is a DoorMat placeholder, override it with app/views/door_mat/activity_mailer/confirm_email.text.erb in your application.
|
4
|
+
|
5
|
+
<% @parameters.keys.each do |key| %>
|
6
|
+
<%= key %> -> <%= @parameters[key] %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p>To reset your password, please visit the URL below</p>
|
2
|
+
|
3
|
+
<p>This email body is a DoorMat placeholder, override it with app/views/door_mat/activity_mailer/reset_password.html.erb in your application.</p>
|
4
|
+
|
5
|
+
<ul>
|
6
|
+
<% @parameters.keys.each do |key| %>
|
7
|
+
<li>
|
8
|
+
<%= key %> -> <%= @parameters[key] %>
|
9
|
+
</li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
To reset your password, please visit the URL below
|
2
|
+
|
3
|
+
This email body is a DoorMat placeholder, override it with app/views/door_mat/activity_mailer/reset_password.text.erb in your application.
|
4
|
+
|
5
|
+
<% @parameters.keys.each do |key| %>
|
6
|
+
<%= key %> -> <%= @parameters[key] %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<h1>Change Password</h1>
|
2
|
+
|
3
|
+
<%= form_for(@change_password, url: change_password_path) do |f| %>
|
4
|
+
<%= render 'door_mat/helpers/errors_if_any', {object: @change_password} %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :old_password %><br>
|
8
|
+
<%= f.password_field :old_password %>
|
9
|
+
</div>
|
10
|
+
<div class="field">
|
11
|
+
<%= f.label :new_password %><br>
|
12
|
+
<%= f.password_field :new_password %>
|
13
|
+
</div>
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :new_password_confirmation %><br>
|
16
|
+
<%= f.password_field :new_password_confirmation %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="actions">
|
20
|
+
<%= f.submit t("door_mat.change_password.submit_button") %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<h1>Forgot Password</h1>
|
2
|
+
|
3
|
+
|
4
|
+
<%= form_for(@forgot_password, url: reset_password_path) do |f| %>
|
5
|
+
<%= render 'door_mat/helpers/errors_if_any', {object: @forgot_password} %>
|
6
|
+
|
7
|
+
<div class="field">
|
8
|
+
<%= f.hidden_field :token %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="field">
|
12
|
+
<%= f.label :email %><br>
|
13
|
+
<%= f.text_field :email %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="field">
|
17
|
+
<%= f.label :password %><br>
|
18
|
+
<%= f.password_field :password %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="field">
|
22
|
+
<%= f.label :password_confirmation %><br>
|
23
|
+
<%= f.password_field :password_confirmation %>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="field">
|
27
|
+
<%= f.label :recovery_key %><br>
|
28
|
+
<%= f.file_field :recovery_key %>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="actions">
|
32
|
+
<%= f.submit t("door_mat.forgot_password.submit_button") %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<h1>Forgot Password</h1>
|
2
|
+
|
3
|
+
<%= form_for(@forgot_password, url: forgot_password_path) do |f| %>
|
4
|
+
<%= render 'door_mat/helpers/errors_if_any', {object: @forgot_password} %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :email %><br>
|
8
|
+
<%= f.text_field :email %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="actions">
|
12
|
+
<%= f.submit t("door_mat.forgot_password.submit_button") %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<h1>Add email</h1>
|
2
|
+
|
3
|
+
<%= form_for(@email, url: add_email_path) do |f| %>
|
4
|
+
<%= render 'door_mat/helpers/errors_if_any', {object: @email} %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :address %><br>
|
8
|
+
<%= f.text_field :address %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="actions">
|
12
|
+
<%= f.submit t("door_mat.manage_email.add_button") %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Follow the access link in the email just sent to you or paste in the access code below.
|
2
|
+
|
3
|
+
<%= form_for(@access_token, url: access_token_path) do |f| %>
|
4
|
+
<%= render 'door_mat/helpers/errors_if_any', {object: @access_token} %>
|
5
|
+
|
6
|
+
<%= f.hidden_field :token_for, :value => @access_token.token_for %>
|
7
|
+
|
8
|
+
<div class="field">
|
9
|
+
<%= f.label :code %><br>
|
10
|
+
<%= f.text_field :identifier %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="actions">
|
14
|
+
<%= f.submit t("door_mat.password_less_session.submit_token") %>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
Enter your email address twice in the form below. A mail will be sent to you immediately with an access token.
|
2
|
+
|
3
|
+
<p>This page is a DoorMat placeholder, to override it create app/views/door_mat/password_less_session/new.html.erb in your application</p>
|
4
|
+
|
5
|
+
<%= form_for(@access_token, url: @access_token.form_submit_path(controller)) do |f| %>
|
6
|
+
<%= render 'door_mat/helpers/errors_if_any', {object: @access_token} %>
|
7
|
+
|
8
|
+
<div class="field">
|
9
|
+
<%= f.label :name %><br>
|
10
|
+
<%= f.text_field :name %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="field">
|
14
|
+
<%= f.label :identifier %><br>
|
15
|
+
<%= f.text_field :identifier %>
|
16
|
+
</div>
|
17
|
+
<div class="field">
|
18
|
+
<%= f.label :confirm_identifier %><br>
|
19
|
+
<%= f.password_field :confirm_identifier %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="field">
|
23
|
+
<%= f.label :is_this_a_public_computer? %>
|
24
|
+
<%= f.check_box :is_public %>
|
25
|
+
</div>
|
26
|
+
<div class="field">
|
27
|
+
<%= f.label :remember_me? %>
|
28
|
+
<%= f.check_box :remember_me %>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="actions">
|
32
|
+
<%= f.submit t("door_mat.password_less_session.submit_button") %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p>Please find your access link below</p>
|
2
|
+
|
3
|
+
<p>This email body is a DoorMat placeholder, override it with app/views/door_mat/password_less_session_mailer/send_token.html.erb in your application.</p>
|
4
|
+
|
5
|
+
<ul>
|
6
|
+
<% @parameters.keys.each do |key| %>
|
7
|
+
<li>
|
8
|
+
<%= key %> -> <%= @parameters[key] %>
|
9
|
+
</li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Please find your access link below
|
2
|
+
|
3
|
+
This email body is a DoorMat placeholder, override it with app/views/door_mat/password_less_session_mailer/send_token.text.erb in your application.
|
4
|
+
|
5
|
+
<% @parameters.keys.each do |key| %>
|
6
|
+
<%= key %> -> <%= @parameters[key] %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h1>Reconfirm Password</h1>
|
2
|
+
|
3
|
+
<% if @current_session_email.blank? %>
|
4
|
+
<p>Please type in your password one more time:</p>
|
5
|
+
<% else %>
|
6
|
+
<p>Please type in the <%= @current_session_email %> password one more time:</p>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<%= form_tag(door_mat.reconfirm_password_path) do %>
|
10
|
+
<%= password_field_tag %>
|
11
|
+
<%= submit_tag("Reconfirm") %>
|
12
|
+
<% end %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<h1>Sign In</h1>
|
2
|
+
|
3
|
+
<%= form_for(@sign_in, url: sign_in_path) do |f| %>
|
4
|
+
<%= render 'door_mat/helpers/errors_if_any', {object: @sign_in} %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :email %><br>
|
8
|
+
<%= f.text_field :email %>
|
9
|
+
</div>
|
10
|
+
<div class="field">
|
11
|
+
<%= f.label :password %><br>
|
12
|
+
<%= f.password_field :password %>
|
13
|
+
</div>
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :is_this_a_public_computer? %>
|
16
|
+
<%= f.check_box :is_public %>
|
17
|
+
</div>
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label :remember_me? %>
|
20
|
+
<%= f.check_box :remember_me %>
|
21
|
+
</div>
|
22
|
+
<p><%= link_to t("door_mat.forgot_password.link"), forgot_password_path %></p>
|
23
|
+
|
24
|
+
<div class="actions">
|
25
|
+
<%= f.submit t("door_mat.sign_in.submit_button") %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
|
30
|
+
<p>Don't have an account yet? <%= link_to 'Sign Up', sign_up_path %></p>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<h1>Sign Up</h1>
|
2
|
+
|
3
|
+
<%= form_for(@sign_up, url: sign_up_path) do |f| %>
|
4
|
+
<%= render 'door_mat/helpers/errors_if_any', {object: @sign_up} %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :email %><br>
|
8
|
+
<%= f.text_field :email %>
|
9
|
+
</div>
|
10
|
+
<div class="field">
|
11
|
+
<%= f.label :password %><br>
|
12
|
+
<%= f.password_field :password %>
|
13
|
+
</div>
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :password_confirmation %><br>
|
16
|
+
<%= f.password_field :password_confirmation %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="actions">
|
20
|
+
<%= f.submit t("door_mat.sign_up.submit_button") %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<p>Already have an account? <%= link_to 'Sign In', sign_in_path %></p>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<h1>You have successfully added a new email!</h1>
|
2
|
+
|
3
|
+
<p>This page is a static DoorMat placeholder, to override it create app/views/door_mat/static/add_email_success.html.erb in your application</p>
|
4
|
+
|
5
|
+
<p>Alternatively, set the add_email_success_url redirect in config/initializers/door_mat.rb to the desired destination</p>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<h1>Please confirm your email address</h1>
|
2
|
+
|
3
|
+
<p>To access the page you requested your email address must first be confirmed</p>
|
4
|
+
|
5
|
+
<p>
|
6
|
+
To confirm your email address, please follow the link in the confirmation email
|
7
|
+
sent to <%= DoorMat::Session.current_session.email.address %>.
|
8
|
+
</p>
|
9
|
+
|
10
|
+
<p>
|
11
|
+
You can also request that a new confirmation email be sent.
|
12
|
+
|
13
|
+
<%= form_tag(door_mat.resend_email_confirmation_path) do %>
|
14
|
+
<%= hidden_field_tag( 'email', DoorMat::Session.current_session.email.to_urlsafe_encoded) %>
|
15
|
+
<%= submit_tag("Resend confirmation email") %>
|
16
|
+
<% end %>
|
17
|
+
</p>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<p>Your password was successfully reconfirmed!</p>
|
2
|
+
<p>This page is a static DoorMat placeholder, override it with the /reconfirm_password_success route in your application.</p>
|
3
|
+
|
4
|
+
<p>Alternatively, set the reconfirm_password_success_url redirect in config/initializers/door_mat.rb to the desired destination</p>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<h1>You have successfully signed in!</h1>
|
2
|
+
|
3
|
+
<p>This page is a static DoorMat placeholder, to override it create app/views/door_mat/static/sign_in_success.html.erb in your application</p>
|
4
|
+
|
5
|
+
<p>Alternatively, set the sign_in_success_url redirect in config/initializers/door_mat.rb to the desired destination</p>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<h1>You have successfully signed out!</h1>
|
2
|
+
|
3
|
+
<p>This page is a static DoorMat placeholder, to override it create app/views/door_mat/static/sign_out_success.html.erb in your application</p>
|
4
|
+
|
5
|
+
<p>Alternatively, set sign_out_success_url redirect in config/initializers/door_mat.rb</p>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<p>You have successfully signed up!</p>
|
2
|
+
<p>This page is a static DoorMat placeholder, override it with the /sign_up_success route in your application.</p>
|
3
|
+
|
4
|
+
<p>Alternatively, set the sign_up_success_url redirect in config/initializers/door_mat.rb to the desired destination</p>
|
data/bin/rails
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
3
|
+
|
4
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
+
ENGINE_PATH = File.expand_path('../../lib/door_mat/engine', __FILE__)
|
6
|
+
|
7
|
+
# Set up gems listed in the Gemfile.
|
8
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
9
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
10
|
+
|
11
|
+
require 'rails/all'
|
12
|
+
require 'rails/engine/commands'
|
@@ -0,0 +1,73 @@
|
|
1
|
+
|
2
|
+
en:
|
3
|
+
door_mat:
|
4
|
+
activity_mailer:
|
5
|
+
confirm_email:
|
6
|
+
subject: "Confirm your email"
|
7
|
+
reset_password:
|
8
|
+
subject: "Reset your password?"
|
9
|
+
actor:
|
10
|
+
could_not_create: "Could not sign you up based on the information provided."
|
11
|
+
max_email_count_per_actor_reached: "The maximum number of email per account was reached."
|
12
|
+
email_already_associated: "This email is already associated with your account."
|
13
|
+
manage_email:
|
14
|
+
email_added: 'New email address successfully added. Please check your inbox for the confirmation email.'
|
15
|
+
could_not_delete: 'The specified email can not be deleted.'
|
16
|
+
could_not_delete_only_email: 'Can not delete the only email address associated with this account.'
|
17
|
+
could_not_delete_current_email: 'Can not delete the email address you are currently logged in with.'
|
18
|
+
can_not_delete_primary: 'Primary email can not be deleted; specify a different primary email first.'
|
19
|
+
email_deleted: 'Email deleted.'
|
20
|
+
primary_email_updated: 'Primary email was set.'
|
21
|
+
could_not_update_primary_email: 'Primary email could not be set.'
|
22
|
+
add_button: 'Add email'
|
23
|
+
session:
|
24
|
+
initialization_failure: "Session initialization failed"
|
25
|
+
could_not_create: "Could not sign you in based on the information provided."
|
26
|
+
submit_button: "Sign In"
|
27
|
+
password_less_session:
|
28
|
+
create_failed: "Could not create a request token based on the information provided."
|
29
|
+
blank_identifier: "The identifier can not be blank."
|
30
|
+
identifier_error: "The identifier provided does not match the confirmation field. Please check the inputs."
|
31
|
+
expect_email_identifier: "The identifier is expected to be a valid email address."
|
32
|
+
submit_button: "Request access token"
|
33
|
+
submit_token: "Submit access token"
|
34
|
+
actor_missing: 'Access token could not be created.'
|
35
|
+
password_less_session_mailer:
|
36
|
+
send_token:
|
37
|
+
subject: "Your access link"
|
38
|
+
forgot_password:
|
39
|
+
make_new_request: 'Please make a new request.'
|
40
|
+
link: "Forgot your password?"
|
41
|
+
submit_button: "Reset"
|
42
|
+
sign_up:
|
43
|
+
submit_button: "Sign Up"
|
44
|
+
failed: "Could not sign you up based on the information provided"
|
45
|
+
sign_in:
|
46
|
+
submit_button: "Sign In"
|
47
|
+
failed: "Could not sign you in based on the information provided"
|
48
|
+
change_password:
|
49
|
+
submit_button: "Change Password"
|
50
|
+
failed: "Failed to changed password"
|
51
|
+
success: "Password was successfully changed"
|
52
|
+
security_questions:
|
53
|
+
q1: "What was the name of your first stuffed animal?"
|
54
|
+
q2: "What was your childhood nickname?"
|
55
|
+
q3: "What is the name of your favorite childhood friend?"
|
56
|
+
q4: "What was your childhood phone number including area code? (e.g., 000-000-0000)"
|
57
|
+
q5: "What street did you live on in third grade?"
|
58
|
+
q6: "What was the last name of your third grade teacher?"
|
59
|
+
q7: "What school did you attend for sixth grade?"
|
60
|
+
q8: "What is your oldest sibling’s birthday month and year? (e.g., January 1900)"
|
61
|
+
q9: "What is your oldest sibling's middle name?"
|
62
|
+
q10: "Where were you when you had your first kiss?"
|
63
|
+
q11: "What is the first name of the boy or girl that you first kissed?"
|
64
|
+
q12: "What is your oldest cousin's first and last name?"
|
65
|
+
q13: "In what city or town did your mother and father meet?"
|
66
|
+
q14: "In what city does your nearest sibling live?"
|
67
|
+
q15: "What is your maternal grandmother's maiden name?"
|
68
|
+
q16: "In what city or town was your first job?"
|
69
|
+
q17: "What is the name of the place your wedding reception was held?"
|
70
|
+
q18: "What is the name of a college you applied to but didn't attend?"
|
71
|
+
q19: "In what city did you meet your spouse/significant other?"
|
72
|
+
q20: "What is the middle name of your oldest child?"
|
73
|
+
q21: "Where were you when you first heard about 9/11?"
|