Repository navigation
Upgrade account management architecture - #1677
Conversation
385b8f5 to
b02c8dc
Compare
|
Note to self: might still want to add additional storage here that links pods to their owner to solve #1364 in the future as there currently is no way to determine the owner of a pod, only a way to determine if a specific WebID is the owner. Now would be the best time to add this as storage is being modified at this time anyway. |
| After logging in, the API will return a `set-cookie` header. | ||
| This cookie is necessary to have access to many of the APIs. | ||
| When including this cookie, the controls object will also be extended with new URLs that are now accessible. | ||
| When logging in, the response body JSON body will also contain a `cookie` field containing the cookie value. |
There was a problem hiding this comment.
The structure of that field should still be described (css-account=xxx).
There was a problem hiding this comment.
Also perhaps, in the body (where I got the field value from), we shouldn't call the field cookie but authorization or secret or similar. Or maybe just not have it at all, and move auth entirely to the headers.
The reason only logins are linked is because they are the only one with an update page. Clicking that email address goes to the page to change your password, not to send a mail. Which might be confusing and better to just have an update link separately instead. |
I'd to both; make all URLs links, and then have |
0f6764b to
ea33779
Compare
|
PR has been updated so the new indexed storage is used, simplifying all data-related account classes. Next steps:
|
efd5f96 to
7c66836
Compare
29c6236 to
3b22cb2
Compare
| When logging in, the response body JSON body will also contain an `authorization` field | ||
| containing the `$VALUE` value mentioned above. | ||
| Instead of using cookies, | ||
| this value can be used in an `Authorization` header with value `CSS-Account-Cookie $VALUE` |
There was a problem hiding this comment.
CSS-Account-Cookie might not be an appropriate scheme name, or at least a confusing one. Suggestion: CSS-API-Token.
There was a problem hiding this comment.
Going to change it to CSS-Account-Token. CSS-API-Token feels too generic just in case another API gets added at some point.
3b22cb2 to
8b5de38
Compare
Another HTML page where I forgot to remove the |
8b5de38 to
9875662
Compare
9875662 to
4094f6e
Compare
4094f6e to
8c7c9f3
Compare
Complete rewrite of the account management and related systems. Makes the architecture more modular, allowing for easier extensions and configurations.
8c7c9f3 to
42a1ca7
Compare


📁 Related issues
Closes #972, closes #1347, closes #1364
✍️ Description
This PR should not be merged as it completely breaks account information of existing servers! A solution that migrations the data needs to be developed first. Until then this branch can already be used to set up a server with the new account features though.
Completely changes how the account management works and what the related architecture looks like. Included in the PR is documentation that fully describes the architecture and functionality. I'll summarize below.
Where the old registration combined the creation of an account, a pod, and registering a WebID, in the new version these are all separate actions in the JSON API. First a user creates an empty account, then they add an email/password combination to it, and then they can create pods, link WebIDs, create tokens, or add more email/password combinations to the same accont. New HTML pages have been made to support the new functionality, including an account overview page that allows you to see everything linked to an account and update its contents.
The main idea is that due to th enew architecture it should also be easier to extend or replace components to ehnahnce the functionality, such as adding a new login method for example.
Cookies are used for authorization, although a custom authorization header can also be used.
There is still a registration page that combines the creation of an account and adding an email/password for ease of use.
Setup has been removed as its main point was just creating an initial account, and it no longer felt so useful after the account changes. Due to the changes to the static files handler we can now have a static page at the root, which replaces the introductory function of the setup.
Pod seeding has been changed so now multiple pods can be created for a single account.