oxalica
59a8851b32
refactor(types): allow SignExt::sign_msg_with
using a fixed nonce
...
This simplifies tests and avoid the use of deprecated `StepRng`.
2025-09-11 18:24:07 -04:00
oxalica
583f916cbe
chore,build(deps): remove rand 0.8 dependency
2025-09-11 18:12:14 -04:00
oxalica
401618c129
chore(types,blahd): fix clippy warnings
2025-09-11 17:46:16 -04:00
oxalica
b97ce5f29c
build(deps): update dependencies
...
CI / Code style (push) Waiting to run
CI / Test beta (push) Waiting to run
CI / Test stable (push) Waiting to run
CI / Flake package (push) Waiting to run
Deploy OpenAPI doc to Pages / deploy (push) Waiting to run
This includes:
- mock_instant 0.5 -> 0.6
- rstest 0.24 -> 0.26
- rusqlite 0.34 -> 0.37
- schemars 0.8 -> 1.0
- serde-inline-default 0.2 -> 1.0
- tokio-tungstenite 0.26 -> 0.27
Only schemars update needs some minor code changes.
2025-09-10 21:10:49 -04:00
oxalica
40e4a53886
build(deps): update to rand 0.9 is possible
...
CI / Code style (push) Has been cancelled
CI / Test beta (push) Has been cancelled
CI / Test stable (push) Has been cancelled
CI / Flake package (push) Has been cancelled
Deploy OpenAPI doc to Pages / deploy (push) Has been cancelled
Except for code using ed25519-dalek, since we are blocked by them.
Also tweak RNG source so only key generation uses `OsRng`. PoW nonce
generation only need unpredictability thus `ThreadRng` suffices.
See: https://github.com/dalek-cryptography/curve25519-dalek/issues/731
2025-04-15 20:28:09 -04:00
oxalica
2e0a878d56
build: migrate to Rust edition 2024
2025-03-18 11:38:19 -04:00
oxalica
37fbf5149e
build(deps): update to rusqlite 0.34, rustix 1 and fix warnings
2025-03-18 11:28:42 -04:00
oxalica
740e540b4b
build(deps): update to axum 0.8, rusqlite 0.33, tokio-tungstenite 0.26, thiserror 2
2025-02-11 00:13:56 -05:00
oxalica
c3842a6d3b
feat(webapi): impl identity description retrieval
2024-10-18 11:12:29 -04:00
oxalica
d7ac77a1d9
chore(types): unbloat and clean up dependencies
2024-10-18 10:25:21 -04:00
oxalica
ccd5401411
refactor(chores): move rusqlite impls into dedicate mod
2024-10-18 09:46:42 -04:00
oxalica
ea69062a6d
feat(types): add optional schemars support
2024-10-17 10:29:06 -04:00
oxalica
ee85112fb6
doc: add and sync code docs from OAPI
2024-10-17 10:29:06 -04:00
oxalica
70568f1ffa
fix(types)!: fix missed rename and fix test
2024-10-12 14:21:30 -04:00
oxalica
920a1cc3b9
feat(webapi): impl member information query
2024-10-12 14:14:39 -04:00
oxalica
8378c4d230
feat(webapi): impl member permission update
2024-10-12 14:14:39 -04:00
oxalica
ad4a38cf43
feat(blahd): impl non-self member removal
2024-10-12 14:14:39 -04:00
oxalica
d1dfda51db
refactor(webapi): split /room/:rid/admin
endpoint and deprecate
...
Since we alraedy use `/room/:rid/member`, member CRUD can use this path
for better semantics.
The `admin` endpoint will be removed later.
2024-10-12 14:13:30 -04:00
oxalica
b8921a5485
chore(*): remove or update obsolete TODOs
2024-10-08 23:19:57 -04:00
oxalica
ff7fd9e4b2
feat(webapi): include cid
in ServerEvent::Msg
2024-10-08 21:20:20 -04:00
oxalica
c611396331
fix(types): add missed default type
2024-10-05 02:41:16 -04:00
oxalica
4e8124cda6
refactor(blahd,types): hoist more types into types crate
2024-10-05 00:19:05 -04:00
oxalica
367f6d2a4b
feat(webapi): impl room member listing
2024-10-01 06:50:53 -04:00
oxalica
bc6e6c2056
refactor(webapi,types)!: make challenge type extensive
...
We may allow more challenge types other than PoW in the future, eg.
captcha. So make the relevent types more generic.
Now the challenge is returned in JSON response as a individual top-level
field `register_challenge` instead of in HTTP headers.
2024-10-01 05:26:00 -04:00
oxalica
31dc3e33c6
feat(types,blahd): allow using mock clock for testing
2024-09-28 21:30:42 -04:00
oxalica
70481e6c74
feat(blahd): impl ETag for feed
2024-09-25 14:04:58 -04:00
oxalica
fa14844d0d
feat(webapi): expose server metadata
2024-09-25 12:45:26 -04:00
oxalica
8551540798
refactor(types)!: blow up big lib.rs into submods
2024-09-25 11:15:31 -04:00
oxalica
a38b59da84
fix(types,blahd): reject timestamps > i64::MAX
2024-09-24 20:36:27 -04:00
oxalica
82f69eb96a
bench: move to blah-types and add for sign/verify
2024-09-23 14:49:36 -04:00
oxalica
2fe8dfdab7
test: add more tests for register verification
2024-09-22 12:18:41 -04:00
oxalica
dd940d5769
feat(types): impl Debug,From<{&,}VerifyingKey> for PubKey
2024-09-22 07:28:21 -04:00
oxalica
475bd59117
build(deps): update dependencies and omit minor version spec
2024-09-22 05:58:39 -04:00
oxalica
a7f31e5fad
refactor(webapi)!: avoid u64/i64 usage in types except timestamp
...
We do not need that many big numbers yet. This should simplify client
implementation without native u64 (eg. JavaScript).
Also put a hard limit on `unseen_cnt` query.
2024-09-21 15:14:50 -04:00
oxalica
bc856f6c62
feat(webapi): impl room deletion
2024-09-21 14:46:47 -04:00
oxalica
8f20aa0cf2
feat(types): add trait SignExt
for easy chaining
2024-09-21 13:57:27 -04:00
oxalica
5c4dfd4a96
fix(types): fix typo
2024-09-21 07:37:57 -04:00
oxalica
fafd2de2e3
refactor(database)!: decouple SQLs from backend logic and cache stmts
...
This decouples SQLs from handler logic, makes it easier for auditing and
caching. It also enables the possibility to switch or support multiple
database backends.
2024-09-21 07:37:06 -04:00
oxalica
82ab7f7d2c
refactor(types): move UserIdentityDesc
verification into types crate
2024-09-19 02:37:03 -04:00
oxalica
fac380fe55
refactor(types,register): introduce IdUrl
and related types into submod
...
- `IdUrl` does basic validation for identity URL. Server could enforce
additional restrictions on their own need.
- single-label doamins are now rejected by default.
- More tests are added for `IdUrl` validation.
2024-09-19 01:44:09 -04:00
oxalica
5252aa19ee
feat(blahctl): add identity management commands
2024-09-17 21:44:36 -04:00
oxalica
cb72d049e0
feat(types,webapi): impl id_key/act_key for all APIs and update docs
2024-09-17 21:44:36 -04:00
oxalica
fb76756482
feat(webapi): impl user registration and identity description format
2024-09-16 10:45:40 -04:00
oxalica
985ea1d68a
remove(types)!: remove members
from CreateGroup
...
Now a group can only be created with the creator as the only initial
member. This forbids group creator from adding other members without
their consent. Additional members can join the group later at their own
will.
2024-09-16 06:39:10 -04:00
oxalica
93d1589730
refactor(types): WithSig
-> Signed
2024-09-13 03:32:11 -04:00
oxalica
73eb441a26
refactor(*): use term msg
to replace item
...
- `Msg` or `msg` is now the canonical term for the substructure in a
room. It includes a `chat` subtype and (in the future) other
administration subtypes like member joining or leaving.
- `Message` or `message` can used in human oriented context like docs
and comments, but only when it is unambiguous.
- `message` is not chosen in code because it's hard to type (at least
for me!), and have ambiguous meaning of:
- "Human readable text" in context of `ApiError`'s field.
- "A unit of data transfer, datagram" in context of WebSocket Message.
- `item` is not chosen because it is overly generic.
2024-09-13 03:32:11 -04:00
oxalica
1e944ead31
feat: impl basic peer chat
2024-09-10 12:26:37 -04:00
oxalica
9e96927693
doc: fix missed docs of member_permission
2024-09-10 12:16:48 -04:00
oxalica
4f48b390f7
feat(webapi): include member_permission
in RoomMetadata
...
This is currently only included by `room_list` endpoint with
authentication.
2024-09-10 09:33:59 -04:00
oxalica
74c6fa6f6a
refactor(webapi): hoist RoomMetadata
to blah_types
and rename last_chat
to last_item
2024-09-10 09:19:15 -04:00