|
@@ -705,12 +705,13 @@ Below you find more information on each of the authentication types.
|
705
|
705
|
|
706
|
706
|
#### Database authentication
|
707
|
707
|
|
708
|
|
-The database authentication middleware defines two new routes:
|
|
708
|
+The database authentication middleware defines three new routes:
|
709
|
709
|
|
710
|
710
|
method path - parameters - description
|
711
|
|
- ----------------------------------------------------------------------------------------
|
|
711
|
+ ---------------------------------------------------------------------------------------------------
|
712
|
712
|
POST /login - username + password - logs a user in by username and password
|
713
|
713
|
POST /logout - - logs out the currently logged in user
|
|
714
|
+ GET /me - - returns the user as which you're currently logged in
|
714
|
715
|
|
715
|
716
|
A user can be logged in by sending it's username and password to the login endpoint (in JSON format).
|
716
|
717
|
The authenticated user (with all it's properties) will be stored in the `$_SESSION['user']` variable.
|