addict v0.3.0 Addict.Plugs.Authenticated

Authenticated plug can be used to filter actions for users that are authenticated.

Summary

Functions

Call represents the use of the plug itself

Functions

call(conn, )

Call represents the use of the plug itself.

When called, it will assign current_user to conn, so it is possible to always retrieve the user via conn.assigns.current_user.

In case the user is not logged in, it will redirect the request to the Application :addict :not_logged_in_url page. If none is defined, it will redirect to /error.

init(options)
is_logged_in(user_session)