Add functionality for an application to have an API
Summary
Adds support for communication between Labrador applications.
Checklist
All items on this checklist should be checked.
-
I have added a changelog entry. -
I have added tests for the functionality that I added. -
I adhere to the style guide.
Technical details
The authentication workflow is as follows:
- App 1 asks core where 'App 2' is located
- App 1 sends a request to
/api/authenticate
on App 2 - App 2 asks core to see if App 1 is an authenticated Labrador app
- App 2 generates an API token valid for 1 hour and sends it to App 1
- App 1 can then communicate with App 2 without help from core until the token expires
Edited by Ruben Backx