about summary refs log tree commit diff
path: root/kittybox-rs
Commit message (Collapse)AuthorAgeFilesLines
...
* kittybox-indieauth: implement FromStr for ScopesVika2022-07-101-3/+12
|
* media: fix failing testVika2022-07-101-1/+1
|
* Security bugfix: fix Scopes::has_all() incorrectly checking scopesVika2022-07-101-2/+15
| | | | | Turns out it was comparing the list of required scopes with **itself**. Oops, that's a major security issue.
* kittybox-indieauth: initVika2022-07-106-2/+535
| | | | | | | | | | This crate is the base framework-agnostic implementation of all data structures and methods required for IndieAuth protocol. Anything that can deserialize HTTP request payloads with serde can utilize this crate. This is a good candidate to independently release on crates.io when the interface becomes stable enough.
* database: use .path().to_path_buf() to prevent dropping the tempdirVika2022-07-101-1/+3
| | | | | I'm afraid this might've caused me to do some weird stuff with the tempdir. Better do it like this.
* micropub: handle invalid/empty query properlyVika2022-07-101-6/+16
| | | | On query parsing error, this will return a MicropubError.
* micropub: move MicropubError into kittybox-utilVika2022-07-106-87/+112
| | | | | Looks like this shared data structure will be useful to me later when splitting off the media endpoint into its own crate.
* indieauth: rename to tokenauthVika2022-07-107-12/+12
| | | | | | | | | | | | This frees up the name for the future in-house IndieAuth implementation and also clarifies the purpose of this module. Its future is uncertain - most probably when the token endpoint gets finished, it will transform into a way to query that token endpoint. But then, the media endpoint also depends on it, so I might have to copy that implementation (that queries an external token endpoint) and make it generic enough so I could both query an external endpoint or use internal data.
* media: media endpoint PoCVika2022-07-108-154/+350
| | | | | | | | | | Supported features: - Streaming upload - Content-addressed storage - Metadata - MIME type (taken from Content-Type) - Length (I could use stat() for this one tho) - filename (for Content-Disposition: attachment, WIP)
* .envrc: watch shell.nix for changesVika2022-07-071-0/+1
|
* .envrc: update nix-direnv install invocationVika2022-07-071-3/+6
|
* format using rustfmtVika2022-07-0712-202/+228
|
* treewide: rewrite using AxumVika2022-07-0718-2859/+2075
| | | | | | | | | | | | | | Axum has streaming bodies and allows to write simpler code. It also helps enforce stronger types and looks much more neat. This allows me to progress on the media endpoint and add streaming reads and writes to the MediaStore trait. Metrics are temporarily not implemented. Everything else was preserved, and the tests still pass, after adjusting for new calling conventions. TODO: create method routers for protocol endpoints
* feat: group endpoints under `.kittybox`Vika2022-06-024-67/+50
| | | | | Actually got the idea from https://xeiaso.net/, who groups xer website's endpoints under the `.within` folder.
* direnv: move .envrc to kittybox-rsVika2022-05-281-0/+4
|
* frontend: fix onboarding sending the request to the wrong placeVika2022-05-261-2/+2
|
* flake.nix: reorganizeVika2022-05-2432-0/+11613
- Kittybox's source code is moved to a subfolder - This improves build caching by Nix since it doesn't take changes to other files into account - Package and test definitions were spun into separate files - This makes my flake.nix much easier to navigate - This also makes it somewhat possible to use without flakes (but it is still not easy, so use flakes!) - Some attributes were moved in compliance with Nix 2.8's changes to flake schema