Coherence.SessionControllerBase (Coherence v0.8.0)
Default SessionConroller action and support functions.
Injects all the default handles for a session controller through a __using__
macro. The following functions are available for override:
- login_cookie: 0
- get_login_cookie: 1
- new: 2
- create: 2
- confirmed_access?: 1
- do_lockable: 4
- delete: 2
- reset_failed_attempts: 3
- failed_login: 3
- put_flash_inactive_user: 1
- rememberable_callback: 5
- do_rememberable_callback: 5
- do_valid_login: 4
- save_login_cookie: 5
- save_rememberable: 3
- get_rememberables: 1
- validate_login: 3
- get_invalid_login!: 4
- delete_expired_tokens!: 1
- hash: 1
- gen_cookie: 3
- user_active?: 1
- schema: 1
Examples
def MyProjectWeb.Coherence.SessionController do
use MyProjectWeb.Coherence, :controller
use Coherence.SessionControllerBase, schemas: MyProject.Coherence.Schemas
plug :layout_view, view: Coherence.SessionView, caller: __MODULE__
plug :redirect_logged_in when action in [:new, :create]
end