Skip to content

Add authentication to currently used requests

Otto Visser requested to merge backend_basic_auth into dev

In this merge request, the following is changed:

  • Authentication is added to nearly all user endpoints (see the restapi.yaml).
  • The YAML API documentation is edited. If [NOT AUTHENTICATED] is in the description, the authentication is not configured.
  • The display name of the user is added to the database.
  • The home path of the website is configured to redirect to the state in which the user currently is (login, accept gdpr or done).

In order to update the MySQL database, the following script can be used:

ALTER TABLE User ADD COLUMN display_name VARCHAR(512) CHARACTER SET utf8mb4 NULL;
UPDATE User SET display_name = CONCAT(first_name, ' ', last_name);
ALTER TABLE User MODIFY COLUMN  display_name VARCHAR(512) CHARACTER SET utf8mb4 NOT NULL;
Edited by Otto Visser

Merge request reports