Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Require SSL for all clearance controllers

  • Loading branch information...
commit ba6420f32baab33ad11e759651fbed554f816182 1 parent 591222c
@nate nate authored
View
3  app/controllers/confirmations_controller.rb
@@ -1,4 +1,7 @@
class ConfirmationsController < Clearance::ConfirmationsController
+
+ ssl_required
+
private
def redirect_signed_out_confirmed_user
View
5 app/controllers/passwords_controller.rb
@@ -0,0 +1,5 @@
+class PasswordsController < Clearance::PasswordsController
+
+ ssl_required
+
+end
View
2  app/controllers/sessions_controller.rb
@@ -1,5 +1,7 @@
class SessionsController < Clearance::SessionsController
+ ssl_required
+
def create
@user = User.authenticate(params[:session][:who],
params[:session][:password])
View
5 app/controllers/users_controller.rb
@@ -0,0 +1,5 @@
+class UsersController < Clearance::UsersController
+
+ ssl_required
+
+end
View
7 config/routes.rb
@@ -87,6 +87,13 @@
resource :confirmation, :only => [:new, :create], :as => :user_confirmation
end
+ resources :passwords, :only => [:new, :create]
+
+ resources :users do
+ resource :password, :only => [:create, :edit, :update]
+ resource :confirmation, :only => [:new, :create]
+ end
+
################################################################################
# Root
Please sign in to comment.
Something went wrong with that request. Please try again.