Openmaize v0.19.2 Openmaize.Login.Base

Base implementation of the login module.

This is used by Openmaize.Login.

You can also use it to create your own custom module / plug.

Summary

Functions

Handle the login POST request

Functions

handle_login(conn, user_params, arg)

Handle the login POST request.

If the login is successful and otp_required: true is not in the user model, a JSON Web Token will be added to the conn, either in a cookie or in the body of the response. The conn is then returned.

If otp_required: true is in the user model, conn.private.openmaize_otp_required will be set to true, but no token will be issued yet.