Commit Graph

184 Commits

Author SHA1 Message Date
Severin Alexander Bühler
ca0995cb23 chore: Moved e2e tests / Fixes circular dependency (#88)
* moved e2e tests

* moved e2e tests to its own workspace member

* fmt
2025-03-21 13:15:33 +02:00
Severin Alexander Bühler
3e761720de Feat(client): getHomeserver (#86)
* added method

* added wasm rust analyzer section

* getHomeserver wasm

* updated readme

* getHomeserver js test

* correct js typing

* fixed js getHomeserver call

* fmt and clippy

* Update pubky/README.md

Co-authored-by: SHAcollision <127778313+SHAcollision@users.noreply.github.com>

* moved get_homeserver from internal to auth

* reuse extract_host_from_packet

* removed unused imports

* removed version from testnet

* fixed tests

---------

Co-authored-by: SHAcollision <127778313+SHAcollision@users.noreply.github.com>
2025-03-19 11:17:13 +02:00
SHAcollision
6386f1ae43 feat: signup tokens (#80)
* Add admin and signup config

* Add signup tokens API, db, admin endpoint

* Add client api for signup codes

* Add tests and fixes

* Fix wasm build

* Lint

* enable and use same admin pswd on all test homeservers

* fix pr review comments

* Add nodejs and browser signup token to tests

* update signup example

* admin authing as layer

* Update pubky-homeserver/src/core/routes/auth.rs

Co-authored-by: Severin Alexander Bühler <8782386+SeverinAlexB@users.noreply.github.com>

* Update pubky-homeserver/src/core/routes/auth.rs

Co-authored-by: Severin Alexander Bühler <8782386+SeverinAlexB@users.noreply.github.com>

* rename getSignupToken util

* add is_used() SignupToken method

---------

Co-authored-by: Severin Alexander Bühler <8782386+SeverinAlexB@users.noreply.github.com>
2025-03-17 15:58:58 -04:00
SHAcollision
b685f8a085 feat: client api for pkarr record republishing (#79)
* feat: add public method to repub homeserver and repub on signin

* Add extract host unit test

* refactor and expose to wasm

* lint

* Fixes add republish tests

* Use pubky timestamp

* Fix wasm spawn

* update republish min time

* fix wasm build

* fix: change republish wasm apii to expect public key

* Update pubky/src/native/internal/pkarr.rs

Co-authored-by: Severin Alexander Bühler <8782386+SeverinAlexB@users.noreply.github.com>

* Update pubky/src/native/internal/pkarr.rs

Co-authored-by: Severin Alexander Bühler <8782386+SeverinAlexB@users.noreply.github.com>

* r record to s signed_packet

* clean up determine host

* fix max_record_age api and change to 1h

---------

Co-authored-by: Severin Alexander Bühler <8782386+SeverinAlexB@users.noreply.github.com>
2025-03-17 10:46:33 -04:00
nazeh
44ae44c2b2 chore(testnet): prepare for release 2025-02-13 20:15:12 +03:00
nazeh
6b92c39af0 feat(homeserver): add Server header with version number 2025-02-13 18:54:48 +03:00
nazeh
91d834f9d8 feat: upgrade pubky-common and http-relay 2025-02-13 14:27:04 +03:00
nazeh
15cfeef84d fix(pubky): testnet hardcoded configurations 2025-02-13 13:08:24 +03:00
nazeh
f423257017 feat(testnet): testnet working with wasm tests 2025-02-12 21:38:31 +03:00
nazeh
fb8efe3866 fix(pubky): bad method documentation 2025-02-12 19:58:22 +03:00
nazeh
fee569dc32 feat(pubky): integrate pubky_testnet in pubky crate and pass tests 2025-02-12 19:12:19 +03:00
nazeh
028156c0b1 fix(http-relay): add cors 2025-02-10 18:49:40 +03:00
nazeh
bc1960e4e9 feat(pubky): update http relay to correctly test reconnecting 2025-02-10 14:48:28 +03:00
nazeh
62ddf0fbe6 feat(js): export AuthRequest in js as a wrapper around native 2025-02-09 22:45:58 +03:00
nazeh
5fbbdb577b feat(pubky): reconnect to timeout Auth request until the receiver is dropped 2025-02-09 12:59:25 +03:00
nazeh
893300d6b2 chore: fix formatting 2025-02-08 13:17:14 +03:00
Nuh
1d7781702a Merge branch 'main' into dev 2025-02-08 12:54:10 +03:00
nazeh
32a9e653b2 feat(pubky): update to pkarr v3 release candidate 2025-02-07 23:56:27 +03:00
nazeh
8be809c159 feat: update pkarr and mainline and add pubky ClientBuilder 2025-02-04 21:56:23 +03:00
nazeh
130eca3b2d chore(js): publish @synonymdev/pubky@0.4.0-rc3 2025-01-17 14:58:32 +03:00
James Browning
56468acbc0 fix: update default http relay and in tests 2025-01-13 20:30:02 +00:00
nazeh
a14f8008b8 feat: use reserved HTTP_PORT service param for testnet 2025-01-08 13:37:37 +03:00
nazeh
9b7c7c6352 feat: update to pkarr v3-rc1 and mainline v5-rc1 2025-01-06 10:00:47 +03:00
nazeh
ccbd3ff2f9 feat(js): pass all unit tests 2024-12-22 15:41:00 +03:00
nazeh
4ccb06006a fix(homeserver): always get sessions from Cookies instead of manually from headers 2024-12-22 13:08:07 +03:00
nazeh
96be5818a7 feat(pubky): add handle_http_error! macro 2024-12-20 13:50:59 +03:00
nazeh
fa2a7d2738 feat(homeserver): use full public key as cookie name 2024-12-20 13:00:53 +03:00
nazeh
738bff1ae1 feat(homeserver): add PubkyHost and Authz layers 2024-12-20 11:30:58 +03:00
nazeh
3cfe6567f0 feat(homeserver): replace session_id with the first 8 bytes of a key 2024-12-19 16:10:31 +03:00
nazeh
daa06b6453 fix(js): send correct pubky-host header 2024-12-19 13:27:25 +03:00
nazeh
f42797a234 feat(js): pass all unit tests 2024-12-18 00:16:49 +03:00
nazeh
992607a7a7 feat(homeserver): add http relay in homeserver testnet for js testing 2024-12-17 18:00:52 +03:00
nazeh
de7d34eca1 feat(http-relay): add http relay crate to help with local testing 2024-12-17 13:36:05 +03:00
nazeh
b4ef0ca810 feat(js): basic auth with pubky-host header 2024-12-16 13:17:55 +03:00
nazeh
6e886f0180 fix(js): replace pubky:// with https:// in transform_url 2024-12-16 11:04:39 +03:00
nazeh
1c0ff6c028 feat(js): add logging in wasm and setLogLevel function 2024-12-15 16:17:12 +03:00
nazeh
6262bb75cd feat(homeserver,js): connect to testnet from js 2024-12-15 15:14:12 +03:00
nazeh
c97e63ac88 feat(js): update error handling after removing crate::error 2024-12-14 20:39:08 +03:00
nazeh
d0f2ee7139 feat(pubky): remove crate::errors.rs and use anyhow 2024-12-14 20:11:54 +03:00
nazeh
453aa40d88 fix(pubky): fix authz test with in process http relay 2024-12-14 16:37:58 +03:00
nazeh
3ebdeff354 feat(homeserver): use Pkarr Relay in testnet and new Config simplifications 2024-12-14 12:48:53 +03:00
coreyphillips
980bee2041 style: fix indentation in inner_send_auth_token 2024-12-11 16:09:34 -05:00
coreyphillips
bfc18502ce fix: return an error for non-2xx responses using error_for_status()
Previously, the request function returned Ok(()) even if the
HTTP response status was an error (4xx/5xx). By adding
`response.error_for_status()?`, we correctly propagate
HTTP errors rather than masking them, ensuring that timeouts and
other non-2xx status codes produce an error as expected.
2024-12-11 15:50:28 -05:00
nazeh
628049984e feat(pubky): update pkarr and use anyhow 2024-12-03 12:02:26 +03:00
nazeh
b1bef6aa3e wip(js): migrate wasm bindings to support pubky in host 2024-11-26 19:14:00 +03:00
nazeh
6f64831ae7 feat(pubky): pass all unit tests after using pubky in host 2024-11-26 17:46:48 +03:00
nazeh
c088388717 fix(pubky): fix signup url 2024-11-26 14:00:34 +03:00
nazeh
e6f7fb3347 feat(pubky): add an icann reqwest client 2024-11-26 13:36:16 +03:00
nazeh
c9ae34584c feat(pubky): add TLS support for homeserver 2024-11-26 13:04:19 +03:00
nazeh
bb2799e579 fix: clippy 2024-11-25 18:31:00 +03:00