Class: Wallaby::Configuration::Security Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/wallaby/configuration/security.rb

Overview

Deprecated.

Constant Summary collapse

DEFAULT_CURRENT_USER =

Default block to return nil for current user

-> {}
DEFAULT_AUTHENTICATE =

Default block to return nil

-> { true }

Instance Method Summary collapse

Instance Method Details

#authenticateObject

Deprecated.


87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/wallaby/configuration/security.rb', line 87

def authenticate
  Deprecator.alert 'config.security.authenticate', from: '0.3.0', alternative: "    Please change #authenticate_wallaby_user! from the controller instead, for example:\n\n      class Admin::ApplicationController < Wallaby::ResourcesController\n        def authenticate_wallaby_user!\n          authenticate_or_request_with_http_basic do |username, password|\n            username == 'too_simple' && password == 'too_naive'\n          end\n        end\n      end\n  INSTRUCTION\nend\n"

#authenticate?Boolean

Deprecated.


102
103
104
105
106
# File 'lib/wallaby/configuration/security.rb', line 102

def authenticate?
  Deprecator.alert 'config.security.authenicate?', from: '0.3.0', alternative: "    Please use controller#authenticate_wallaby_user! instead.\n  INSTRUCTION\nend\n"

#current_userObject

Deprecated.


67
68
69
70
71
72
73
74
75
76
77
# File 'lib/wallaby/configuration/security.rb', line 67

def current_user
  Deprecator.alert 'config.security.current_user', from: '0.3.0', alternative: "    Please change #wallaby_user from the controller instead, for example:\n\n      class Admin::ApplicationController < Wallaby::ResourcesController\n        def wallaby_user\n          User.find_by_email session[:user_email]\n        end\n      end\n  INSTRUCTION\nend\n"

#current_user?Boolean

Deprecated.


80
81
82
83
84
# File 'lib/wallaby/configuration/security.rb', line 80

def current_user?
  Deprecator.alert 'config.security.current_user?', from: '0.3.0', alternative: "    Please use controller#wallaby_user instead.\n  INSTRUCTION\nend\n"

#email_methodObject

Deprecated.


49
50
51
52
53
# File 'lib/wallaby/configuration/security.rb', line 49

def email_method
  Deprecator.alert 'config.security.email_method', from: '0.3.0', alternative: "    Please use controller_class.email_method instead.\n  INSTRUCTION\nend\n"

#email_method=(_email_method) ⇒ Object

Deprecated.


56
57
58
59
60
61
62
63
64
# File 'lib/wallaby/configuration/security.rb', line 56

def email_method=()
  Deprecator.alert 'config.security.email_method=', from: '0.3.0', alternative: "    Please use #email_method= from the controller instead, for example:\n\n      class Admin::ApplicationController < Wallaby::ResourcesController\n        self.email_method = 'email_address'\n      end\n  INSTRUCTION\nend\n"

#logout_methodObject

Deprecated.


31
32
33
34
35
# File 'lib/wallaby/configuration/security.rb', line 31

def logout_method
  Deprecator.alert 'config.security.logout_method', from: '0.3.0', alternative: "    Please use controller_class.logout_method instead.\n  INSTRUCTION\nend\n"

#logout_method=(_logout_method) ⇒ Object

Deprecated.


38
39
40
41
42
43
44
45
46
# File 'lib/wallaby/configuration/security.rb', line 38

def logout_method=(_logout_method)
  Deprecator.alert 'config.security.logout_method=', from: '0.3.0', alternative: "    Please use #logout_method= from the controller instead, for example:\n\n    class Admin::ApplicationController < Wallaby::ResourcesController\n      self.logout_method = 'put'\n    end\n  INSTRUCTION\nend\n"

#logout_pathObject

Deprecated.


13
14
15
16
17
# File 'lib/wallaby/configuration/security.rb', line 13

def logout_path
  Deprecator.alert 'config.security.logout_path', from: '0.3.0', alternative: "    Please use controller_class.logout_path instead.\n  INSTRUCTION\nend\n"

#logout_path=(_logout_path) ⇒ Object

Deprecated.


20
21
22
23
24
25
26
27
28
# File 'lib/wallaby/configuration/security.rb', line 20

def logout_path=(_logout_path)
  Deprecator.alert 'config.security.logout_path=', from: '0.3.0', alternative: "    Please use #logout_path= from the controller instead, for example:\n\n      class Admin::ApplicationController < Wallaby::ResourcesController\n        self.logout_path = 'destroy_admin_user_session_path'\n      end\n  INSTRUCTION\nend\n"