| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This will ease future extraction of the media endpoint to a separate
crate. This is highly desirable since it will allow Kittybox's media
endpoint to be used separately in instances where a standalone media
endpoint is desirable (e.g. custom solutions using my code to polyfill
for desired functionality that is undesirable to implement by oneself)
|
|
|
|
|
|
|
|
|
| |
Templates and utility types are now separate crates to speed up
compilation, linting and potential reuse/replacement.
Potentially more crates could be split out/modularized, resulting in
speedups, smaller binaries (whenever features are excluded) and even
more reuse capabilities.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
require_token() uses a token endpoint URI and an HTTP client to query
the token endpoint and return a User object if the user was
authorized, or rejecting with IndieAuthError if not. It is recommended
to use recover() and catch the IndieAuthError at the application level
to show a "not authorized" error message to the user.
This function is more intended for API consumption, but is general
enough to permit using in other scenarios.
TODO: make a variant that returns Option<User> instead of rejecting
|
|
|
|
|
|
|
|
|
|
|
| |
Warp allows requests to be applied as "filters", allowing to flexibly
split up logic and have it work in a functional style, similar to
pipes.
Tokio is just an alternative runtime. I thought that maybe switching
runtimes and refactoring the code might allow me to fish out that
pesky bug with the whole application hanging after a certain amount of
requests...
|
| |
|
|
|
|
|
|
|
| |
This will allow readers to view private posts intended just for them.
Additionally fixed bugs in patterns due to which webmentions might not
have been sent.
|
| |
|
| |
|
|
|
|
|
|
| |
When an error is found, the site name passed to Storage::get_setting
in the error handler is incorrect. The ASCII serialisation of the
hostname should get used.
|
|
|
|
|
|
| |
Now the Redis dependencies are optional and only required if you want
to test the backend or actually use it in production. The app displays
a hint if you try to launch with an unsupported backend.
|
|
|
|
|
|
| |
I need to instrument the mobc library used for the Redis connection
pool, but that can be done later since I am somewhat tired. I don't
remember how much I've worked and I need a break... >.<
|
| |
|
|
|
|
|
| |
This prevents Micropub requests fired from web apps on other domains
from being blocked by overzealous browsers.
|
|
|
|
|
|
|
|
| |
The internal token is a shared secret that can update and delete any
posts stored in the database. It is intended for use in webmention
endpoints to update posts with latest webmentions.
Please keep it safe.
|
|
|
|
| |
You're welcome.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
APIs and preparation for onboarding
|
|
|
|
| |
built-in Micropub capabilities when logged in
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
tests to use the Redis database instead of a fake one
|
| |
|
| |
|
|
Working features:
- Sending posts from the database
- Reading posts from the database
- Responding with MF2-JSON (only in debug mode!)
- Not locking the database when not needed
- All database actions are atomic (except for a small race where UIDs
can clash, but that's not gonna happen often)
TODOs:
- Send webmentions
- Send syndication requests
- Send WebSub notifications
- Make tombstones for deleted posts (update adding dt-deleted)
- Rich reply contexts (possibly on the frontend part?)
- Frontend?
- Fix UID race
Code maintenance TODOs:
- Split the database module
- Finish implementing the in-memory test database
- Make RedisDatabase unit tests launch their own Redis instances (see
redis-rs/tests/support/mod.rs for more info)
- Write more unit-tests!!!
|