mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00

Complete rewrite of the account management and related systems. Makes the architecture more modular, allowing for easier extensions and configurations.
1.7 KiB
1.7 KiB
JSON API controls
A large part of every response of the JSON API is the controls
block.
These are generated by using nested ControlHandler
objects.
These take as input a key/value with the values being either routes or other interaction handlers.
These will then be executed to determine the values of the output JSON object, with the same keys.
By using other ControlHandler
s in the input map, we can create nested objects.
The default structure of these handlers is as follows:
flowchart LR
RootControlHandler("<strong>RootControlHandler</strong><br>ControlHandler")
RootControlHandler --controls--> ControlHandler("<strong>ControlHandler</strong><br>ControlHandler")
ControlHandler --main--> MainControlHandler("<strong>MainControlHandler</strong><br>ControlHandler")
ControlHandler --account--> AccountControlHandler("<strong>AccountControlHandler</strong><br>ControlHandler")
ControlHandler --password--> PasswordControlHandler("<strong>PasswordControlHandler</strong><br>ControlHandler")
ControlHandler --"oidc"--> OidcControlHandler("<strong>OidcControlHandler</strong><br>OidcControlHandler")
ControlHandler --html--> HtmlControlHandler("<strong>HtmlControlHandler</strong><br>ControlHandler")
HtmlControlHandler --main--> MainHtmlControlHandler("<strong>MainHtmlControlHandler</strong><br>ControlHandler")
HtmlControlHandler --account--> AccountHtmlControlHandler("<strong>AccountHtmlControlHandler</strong><br>ControlHandler")
HtmlControlHandler --password--> PasswordHtmlControlHandler("<strong>PasswordHtmlControlHandler</strong><br>ControlHandler")
Each of these control handlers then has a map of routes which link to the actual API endpoints. How to add these can be seen here.