Commit graph

57 commits

Author SHA1 Message Date
forgejo-actions
bc00ac08b1 chore(changelog): Update changelog 2024-07-28 05:43:59 +00:00
e61de9a8b1
fix: Handle the websocet in handle_socket itself
All checks were successful
Write changelog / write-changelog (push) Successful in 22s
Update Contributors / Update Contributors (push) Successful in 3s
Rust CI / Rust CI (push) Successful in 4m55s
I have removed the task spwaning in `handle_socket` function, because Salvo
already spawn `handle_socket` function in a new task when upgrading the
connection to websocket. So, there is no need to spawn a new task in
`handle_socket` function.

refs:
- Salvo task spawning: https://github.com/salvo-rs/salvo/blob/main/crates/extra/src/websocket.rs#L247-L256

Reviewed-on: #34
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-28 08:43:20 +03:00
b4cac39157
docs: Improve schemas docs
All checks were successful
Write changelog / write-changelog (push) Successful in 3s
Update Contributors / Update Contributors (push) Successful in 4s
Rust CI / Rust CI (push) Successful in 4m34s
Fixes: #32
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-27 05:27:06 +03:00
bf1d322fe2
chore: Use a specific date-time instead of the current one in schema examples that use it
All checks were successful
Write changelog / write-changelog (push) Successful in 22s
Update Contributors / Update Contributors (push) Successful in 3s
Rust CI / Rust CI (push) Successful in 4m53s
This is to avoid disclosing server uptime

Signed-off-by: Awiteb <a@4rs.nl>
2024-07-27 05:20:04 +03:00
forgejo-actions
7a81ccc0c5 chore(changelog): Update changelog 2024-07-24 08:50:01 +00:00
b79587f537
feat: Add last_logout column to users table
All checks were successful
Write changelog / write-changelog (push) Successful in 4s
Update Contributors / Update Contributors (push) Successful in 4s
Rust CI / Rust CI (push) Successful in 4m26s
Reviewed-on: #31
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-24 11:49:39 +03:00
forgejo-actions
94e3e527ea chore(changelog): Update changelog 2024-07-23 22:19:57 +00:00
1d1bb962bb
refactor: Update public key column type from String to PublicKey
All checks were successful
Write changelog / write-changelog (push) Successful in 4s
Update Contributors / Update Contributors (push) Successful in 5s
Rust CI / Rust CI (push) Successful in 4m29s
Reviewed-on: #29
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Helped-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-24 01:19:34 +03:00
a01f4add0c
refactor: Change config private key type to K256Secret
Reviewed-on: #30
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-24 01:17:13 +03:00
672d7a2d3c
chore: Docker improvments
All checks were successful
Write changelog / write-changelog (push) Successful in 3s
Update Contributors / Update Contributors (push) Successful in 4s
Rust CI / Rust CI (push) Successful in 5m33s
Replace `as` with `AS`
- Remove `version` from `docker-compose.yml`
- Add database configration to oxidetalis environment
- Add `healthcheck` for the database

Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 02:53:26 +03:00
98a02e0370
chore(changelog): Update changelog
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 02:53:20 +03:00
daef92207e
feat: Use url::Host instead of IpOrUrl
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 01:30:19 +03:00
1c273d746b
chore: Add url to oxidetalis_config dependencies
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:39 +03:00
3e4141f30e
docs: Add detailed descriptions to files header
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:39 +03:00
0e26557128
remove: Remove user registration body
Fixes: #15
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:39 +03:00
f0d1b78946
change: Add serde & openapi features to the core
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:38 +03:00
23469f3f5e
chore: Update README.md
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:38 +03:00
2b2bdf7460
chore: Add Code of Conduct
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:38 +03:00
9ff5548601
change: Change the default port
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:38 +03:00
forgejo-actions
17603584f6
Update CONTRIBUTORS.md
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:38 +03:00
abbc083371
fix: Change the CLI settings
Fixes: #10
Reported-by: Awiteb <a@4rs.nl>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:38 +03:00
18fd708c26
fix: Change the way checking if the file changed
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:37 +03:00
16302450ff
chore: Update CONTRIBUTING.md
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:37 +03:00
d3597863e6
chore: Update the copyright
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:37 +03:00
forgejo-actions
8c5d3744ff
Update CONTRIBUTORS.md
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:37 +03:00
ce566ada27
feat: CI to create CONTRIBUTORS.md file
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:37 +03:00
8888bf2d60
feat: Chat request implementation
In this patch, I have implemented the chat request and response from OTMP
protocol. The changes include:
- New `in_chat_request` and `out_chat_request` database tables
- New `users_status` table to store user status (whitelisted or blacklisted)
- New server events:
    - `ChatRequest` To send chat request comes from some user
    - `ChatRequestResponse` To send chat request response to some user
- New client events:
    - `ChatRequest` To send chat request to some user
    - `ChatRequestResponse` To send chat request response to some user
- `ws_errors` macro to create websocket errors
- `/user/whitelist` and `/user/blacklist` API to list whitelisted and
blacklisted users

Fixes: #2
Reviewed-on: #14
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Helped-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:36 +03:00
221a47cfd0
change: Use Scalar as default openapi UI
Fixes: #19
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:36 +03:00
7a2e511910
chore: Update CONTRIBUTING.md
Reviewed-on: #18
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:36 +03:00
1ad98ec27e
feat: Developer Certificate of Origin
Reviewed-on: #17
Fixes: #16
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:36 +03:00
972740f03e
fix: Use old alert blocks style
Because rustdoc lint us with `broken_intra_doc_links`

Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:36 +03:00
4590d8b2af
feat: Make the executable little small
All checks were successful
Write changelog / write-changelog (push) Successful in 10s
Rust CI / Rust CI (pull_request) Successful in 6m52s
Rust CI / Rust CI (push) Successful in 7m5s
Signed-off-by: Awiteb <a@4rs.nl>
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
2024-07-07 20:59:05 +03:00
f5ffa3733e
chore: Update README.md
Add ci/cd badges and repo mirrors

Signed-off-by: Awiteb <a@4rs.nl>
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
2024-07-07 20:59:05 +03:00
fcaf7db674
feat: Create CI/CD
Signed-off-by: Awiteb <a@4rs.nl>
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
2024-07-07 20:59:04 +03:00
d442e73ed7
change: Remove the nonce cache limit
Don't pass the nonce cache limit everywhere, we allocate the hashmap capacity
with it, so we can use the hashmap capacity directly.

Also refactor the `NonceCache` type, make it better without extension trait.

Suggested-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-06 14:07:48 +03:00
c0d5efe0c3
feat: Initialize server websocket
Related-to: #2
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-06 14:07:30 +03:00
cd2a9ea03e
feat: New extension trait for websocket online users
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-05 02:17:10 +03:00
6f43e44745
chore: Add new dependencies for websocket
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-05 02:16:10 +03:00
2471cff83e
chore: Remove sign and verify function logs`
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-04 17:38:42 +03:00
f69fa7f370
docs: Fix typos
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-04 16:42:09 +03:00
062e441d8a
feat: Create signature data if there is no request body
The signature data is `Method+uri path` if there is no request body

Signed-off-by: Awiteb <a@4rs.nl>
2024-07-04 16:11:23 +03:00
77858ac8f4
feat: Create verify instance function for the Signature
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-04 16:08:11 +03:00
f4b2514e75
feat: Derive Hash in PublicKey and Signature
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-03 13:12:20 +03:00
e15c693421
chore: Returns nonce cache as Arc
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-03 13:11:16 +03:00
f47bc82b19
feat: Derive Eq and PartialEq to Signature
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-02 18:18:41 +03:00
39337f8d90
feat: Add sign_with_shared_secret function to K256Secret
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-02 18:17:44 +03:00
aeac22250e
chore: Add TwoDifferentKeys error message
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-02 18:15:00 +03:00
b8e00c244a
chore: Use rustls instead of native-tls
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-01 11:30:57 +03:00
d7f149f436
chore: Remove whitespace
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-01 11:29:29 +03:00
8d3faaf70c
chore: Create changelog
Signed-off-by: Awiteb <a@4rs.nl>
2024-06-26 23:22:47 +03:00