Commit graph

129 commits

Author SHA1 Message Date
Alex Auvolat
7b0b830597
Secure mode federation support (WIP) (#39)
* 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
2023-06-12 13:32:54 +02:00
Grafcube
19baec2138
Specify in docs that send_activity takes remote inboxes (#40) 2023-05-31 14:18:36 +02:00
Felix Ableitner
51613df9e3 Move actix-rt to dev-dependencies 2023-05-24 12:41:00 +02:00
Grafcube
5181f15499
Change domain to host_str (#37) 2023-05-22 10:53:40 +02:00
Felix Ableitner
9df5bd086f Improved logging for activity send 2023-05-04 23:56:27 +02:00
Nutomic
7885e51599
Fix docs link in readme to point to latest version 2023-04-11 22:07:05 +02:00
Grafcube
99cdbb5d58
Multi webfinger response (#33)
* 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
2023-04-04 21:56:34 +02:00
Grafcube
813d7943e1
Change username regex in webfinger (#34)
* 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
2023-04-02 21:32:54 +02:00
Felix Ableitner
c56f526914 Add signature tests, update dependencies, remove Cargo.lock from git 2023-03-30 21:57:18 +02:00
Dessalines
6b4f798f76
Adding woodpecker 1 (#30) 2023-03-24 21:48:51 +01:00
Felix Ableitner
1669a72620 Version 0.4.0 2023-03-16 21:48:17 +01:00
Felix Ableitner
072353fc41 Dont use apub in type names 2023-03-16 21:41:43 +01:00
Felix Ableitner
bd3f17a4df Version 0.4.0-rc3 2023-03-16 02:11:12 +01:00
Nutomic
6a65fa7c98
Changes to make Lemmy work with 0.4 (#29)
* Make it work with Lemmy

* working but needs cleanup

* almost everything working

* debug

* stack overflow fix
2023-03-16 02:11:48 +01:00
Nutomic
6b3a4f8942
Add verify methods back in, some more fixes (#28) 2023-03-09 22:09:44 +01:00
Felix Ableitner
8f2b9634b6 Add docs badge to readme 2023-03-08 22:36:18 +01:00
Felix Ableitner
8697c3fb1c Release 0.4.0-rc1 2023-03-08 22:22:58 +01:00
Felix Ableitner
d94a2ed0fc live federation example 2023-03-08 22:16:43 +01:00
Felix Ableitner
32394696a5 move files 2023-03-06 16:19:43 +01:00
Felix Ableitner
d5ecab1b61 finish rustdoc 2023-03-04 23:20:06 +01:00
Felix Ableitner
19c459fc02 Further improvements 2023-03-02 00:19:10 +01:00
Felix Ableitner
69e77dfa74 Various improvements for usability, examples and docs 2023-02-19 21:26:01 +09:00
Felix Ableitner
5a5c015bfc No default feature, rename to actix-web, merge examples 2023-02-11 22:10:48 +09:00
Nutomic
83ad4bfdc1
Merge handler params into single struct (#25) 2023-02-11 13:32:35 +01:00
Nutomic
6d9682f4e6
Fix deserialize_skip_error function (#24)
https://github.com/serde-rs/serde/issues/1726#issuecomment-577425541
2023-02-04 17:07:13 +01:00
aumetra
463580d734
Restrict the body sizes of responses (#23)
* 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
2023-01-28 04:45:11 +01:00
Paul Delafosse
3220b6b5ca
feat: expose activity pub json wrapped value (#22) 2023-01-25 01:51:41 +01:00
Nutomic
6611debd6b
Remove verify methods (fixes #15) (#21) 2023-01-16 22:54:23 +01:00
Udo
c260c0d5ba
Update links in README (#20) 2023-01-06 23:25:28 +01:00
IFcoltransG
2c5a8c7004
Add keywords for crates.io discoverability (#19) 2023-01-02 12:58:25 +00:00
Nutomic
aee601a831
Merge pull request #17 from MTRNord/patch-1 2022-11-29 21:07:44 +00:00
Marcel
91c4f69514
Fix Matrix Alias in the text of the link 2022-11-29 21:37:57 +01:00
Nutomic
d97ff5cee5
Rename http_fetch_retry_limit to http_fetch_limit (was misleading) (#10) 2022-11-28 21:47:48 +00:00
Paul Delafosse
9332c81458
feat: add axum compat (#12)
* 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'
2022-11-28 21:19:56 +00:00
Felix Ableitner
229e225dce Mention matrix chat in readme 2022-11-28 14:58:28 +01:00
Felix Ableitner
589cde3026 Dont redownload deps between CI steps 2022-11-26 17:12:48 +01:00
Felix Ableitner
0c6dd72328 cargo fmt 2022-11-26 17:12:08 +01:00
Felix Ableitner
96f62b8513 Add missing file 2022-11-24 20:53:07 +01:00
Felix Ableitner
0b603df139 Add some clippy lints 2022-11-24 13:27:38 +01:00
Felix Ableitner
5b8ad33c60 Version 0.3.4 2022-11-23 12:25:32 +01:00
Nutomic
7bc1c4dbd9
Fix date header (#11) 2022-11-23 11:25:08 +00:00
Felix Ableitner
909bc0f2c7 Revert "Rename http_fetch_retry_limit to http_fetch_limit (was misleading)"
This reverts commit 78a86ca835.
2022-11-23 10:59:51 +01:00
Felix Ableitner
78a86ca835 Rename http_fetch_retry_limit to http_fetch_limit (was misleading) 2022-11-22 11:17:36 +01:00
Felix Ableitner
f59c817cc1 Version 0.3.3 2022-11-22 11:10:38 +01:00
Felix Ableitner
f0cadb20c1 Revert "Rename http_fetch_retry_limit to http_fetch_limit (was misleading)"
This reverts commit dc32b0e94e.
2022-11-22 11:10:08 +01:00
Felix Ableitner
dc32b0e94e Rename http_fetch_retry_limit to http_fetch_limit (was misleading) 2022-11-21 15:39:43 +01:00
Nutomic
f9de5c1b10
Dont retry activity send in case of connection error or HTTP status 4xx (#8) 2022-11-21 14:38:49 +00:00
Nutomic
5d670513d6
Only retry activity sending at most 3 times (#7) 2022-11-21 14:38:39 +00:00
Felix Ableitner
d59614f68d Change build status badge to drone.join-lemmy.org 2022-11-16 10:41:46 +01:00
Felix Ableitner
c57ee40092 v0.3.2 2022-11-16 10:30:29 +01:00