Module: Aikotoba::Authenticatable
- Extended by:
- ActiveSupport::Concern
- Includes:
- Scopable, Protection::SessionFixationAttack
- Included in:
- SessionsController
- Defined in:
- app/controllers/concerns/aikotoba/authenticatable.rb
Instance Method Summary
collapse
Methods included from Scopable
#aikotoba_scope, #aikotoba_scope_config, #aikotoba_scoped_path
Instance Method Details
#aikotoba_current_account ⇒ Object
11
12
13
|
# File 'app/controllers/concerns/aikotoba/authenticatable.rb', line 11
def aikotoba_current_account
@aikotoba_current_account ||= aikotoba_current_session&.account
end
|
#aikotoba_sign_in(account) ⇒ Object
15
16
17
|
# File 'app/controllers/concerns/aikotoba/authenticatable.rb', line 15
def aikotoba_sign_in(account)
start_new_aikotoba_session_for(account)
end
|
#aikotoba_sign_out ⇒ Object
19
20
21
|
# File 'app/controllers/concerns/aikotoba/authenticatable.rb', line 19
def aikotoba_sign_out
terminate_aikotoba_session
end
|