Module: HttpBasicAuthentication::Patches::AccountControllerPatch

Extended by:
ActiveSupport::Concern
Defined in:
lib/http_basic_authentication/patches/account_controller_patch.rb

Overview

This module overwrites the default behavior of the AccountController by disabling most of its methods as they make no sense in combination with the implicit user generation used by this plugin

Instance Method Summary collapse

Instance Method Details

#activate_with_http_basicObject



40
41
42
# File 'lib/http_basic_authentication/patches/account_controller_patch.rb', line 40

def activate_with_http_basic
  not_available!
end

#activation_email_with_http_basicObject



44
45
46
# File 'lib/http_basic_authentication/patches/account_controller_patch.rb', line 44

def activation_email_with_http_basic
  not_available!
end

#login_with_http_basicObject



18
19
20
# File 'lib/http_basic_authentication/patches/account_controller_patch.rb', line 18

def 
  not_available!
end

#logout_with_http_basicObject

If the user was fully logged in only present a simple text stating to logout by closing the browser



24
25
26
27
28
29
30
# File 'lib/http_basic_authentication/patches/account_controller_patch.rb', line 24

def logout_with_http_basic
  if User.current.anonymous?
    redirect_to home_url
  elsif request.post?
    render "http_basic_authentication/logout"
  end
end

#lost_password_with_http_basicObject



32
33
34
# File 'lib/http_basic_authentication/patches/account_controller_patch.rb', line 32

def lost_password_with_http_basic
  not_available!
end

#register_with_http_basicObject



36
37
38
# File 'lib/http_basic_authentication/patches/account_controller_patch.rb', line 36

def register_with_http_basic
  not_available!
end