Class: Lolita::Extensions::Authentication::Proxy
- Defined in:
- lib/lolita/extensions/authentication/proxy.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
Instance Method Summary collapse
- #authenticate_user! ⇒ Object
- #current_user ⇒ Object
- #default_adapter? ⇒ Boolean
- #edit_path ⇒ Object
-
#initialize(context, options = {}) ⇒ Proxy
constructor
A new instance of Proxy.
- #sign_out_path ⇒ Object
- #sign_out_via ⇒ Object
- #user_signed_in? ⇒ Boolean
Constructor Details
#initialize(context, options = {}) ⇒ Proxy
Returns a new instance of Proxy.
13 14 15 16 17 |
# File 'lib/lolita/extensions/authentication/proxy.rb', line 13 def initialize context,={} @context = context @options = @adapter = get_adapter() end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
11 12 13 |
# File 'lib/lolita/extensions/authentication/proxy.rb', line 11 def adapter @adapter end |
Instance Method Details
#authenticate_user! ⇒ Object
27 28 29 |
# File 'lib/lolita/extensions/authentication/proxy.rb', line 27 def authenticate_user! @adapter.authenticate_user! end |
#current_user ⇒ Object
19 20 21 |
# File 'lib/lolita/extensions/authentication/proxy.rb', line 19 def current_user @adapter.current_user end |
#default_adapter? ⇒ Boolean
43 44 45 |
# File 'lib/lolita/extensions/authentication/proxy.rb', line 43 def default_adapter? self.adapter.is_a?(Lolita::Extensions::Authentication::DefaultAdapter) end |
#edit_path ⇒ Object
35 36 37 |
# File 'lib/lolita/extensions/authentication/proxy.rb', line 35 def edit_path @adapter.edit_path unless default_adapter? end |
#sign_out_path ⇒ Object
39 40 41 |
# File 'lib/lolita/extensions/authentication/proxy.rb', line 39 def sign_out_path @adapter.sign_out_path unless default_adapter? end |
#sign_out_via ⇒ Object
31 32 33 |
# File 'lib/lolita/extensions/authentication/proxy.rb', line 31 def sign_out_via @adapter.sign_out_via unless default_adapter? end |
#user_signed_in? ⇒ Boolean
23 24 25 |
# File 'lib/lolita/extensions/authentication/proxy.rb', line 23 def user_signed_in? @adapter.user_signed_in? end |