sentinel v2.0.0 Sentinel.Controllers.Json.AuthController

Handles the session create and destroy actions for JSON APIs

Summary

Functions

Log in as an existing user. Parameter are “email” and “password”. Responds with status 200 and {token: token} if credentials were correct. Responds with status 401 and {errors: error_message} otherwise

Destroy the active session. Will delete the authentication token from the user table. Responds with status 200 if no error occured

Functions

callback(conn, params)
create(conn, map)

Log in as an existing user. Parameter are “email” and “password”. Responds with status 200 and {token: token} if credentials were correct. Responds with status 401 and {errors: error_message} otherwise.

delete(conn, params)

Destroy the active session. Will delete the authentication token from the user table. Responds with status 200 if no error occured.

request(conn, params)