* Fix formatting for nightly rustfmt
https://github.com/LemmyNet/lemmy/issues/3467
* Fix regex error when actix-web feature not enabled
If the crate is built with only the axum feature, compiling the
webfinger account regex will fail with an error "Unicode-aware case
insensitivity matching is not available..." because of the missing
unicode-case feature. This doesn't happen if actix is installed because
it pulls in the regex crate with all features (via [actix-router][0]).
The failure can be demonstrated by reverting this commit's change to
Cargo.toml and running:
cargo test --no-default-features --features=axum --doc extract_webfinger_name
Resolve this by adding the unicode-case feature to the regex dependency.
[0]: 0e8ed50e3a/actix-router/Cargo.toml (L25)
* Remove `actix-rt` and replace with tokio tasks
* Include activity queue test
* Use older `Arc` method
* Refactor to not re-process PEM data on each request
* Add retry queue and spawn tokio tasks directly
* Fix doc error
* Remove semaphore and use join set for backpressure
* Fix debug issue with multiple mailboxes
* First iteration of secure mode federation support
* signing_actor: take request by reference
* Implement secure mode fetch as a global config parameter
* Implement secure mode federation example in actix-web example
* fix clippy lints
* Add support for building webfinger for multiple URLs with type
Update `build_webfinger_response` to accept `Vec<(Url, Option<&str>)>`
where `Url` is the ActivityPub ID and `&str` is the optional type.
* Update docs for `build_webfinger_response`
* Update tests to use new `build_webfinger_response`
Tests and docs don't cover usage with some `kind` value.
* Run formatter with nightly
* Revert "Add support for building webfinger for multiple URLs with type"
This reverts commits until 3f70586e63d6f5ae6a9c329ae9e9981da4e2eaaf.
This was a breaking change and should be made into a separate function.
* Add `build_webfinger_response_with_type`
* Construct links separately and update `build_webfinger_response`
- `build_webfinger_response` calls `build_webfinger_response_with_type`.
- Links are constructed in a separate variable.
- Update docs for `build_webfinger_response_with_type` to be clearer
about usage.
- TODO: Use `derive_builder` to simplify function.
* Extract properties into variable
* Remove `other` from docs
* Change username regex in webfinger
Changes the regex used for username in `extract_webfinger_name` to
include additional characters like '.' and '-'. This is the same regex
used in Mastodon.
* Add link to Mastodon regex
* Add default response body size limit
* Limit all the methods, add reqwest shim that wraps around bytes_stream
* Change image to rust:1.65-bullseye
* Use `DeserializeOwned` instead of the HRTB over `Deserialize`
* Remove the configurability, limit to 100KB
* Add documentation to body size restricted functions
* rustfmt
* feat: add actix feature flag
* (WIP)feat: add axum feature
* WIP: axum veridy digest + example
Note: this does not compile yet
* WIP
* chore: clippy lints
* Use actix rt for axum example
* ci: run example in CI for both actix and axum
* feat: add json wrapper type for axum
* docs: update readme with actix and axum feature flags
* fix: fix ci
* chore: more clippy lints
* refactor: update according to PR comment and factorize 'verify_digest'