43778a62fe
feat: New API errors, Querys
and NotRegisteredUser
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:24 +03:00
d7a63ea092
feat: Whitelist extension to return user whitelisted users
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:24 +03:00
b02e2d8b4d
feat: Create WhiteListedUser
schema
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:24 +03:00
89b3c09181
chore: Add EntityOrSelect
to entities prelude
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:24 +03:00
558ceac74f
chore: Fix typos
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:24 +03:00
24e038f482
feat: ChatRequestResponse event
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:23 +03:00
2bfff6c05d
refactor: Refactor server errors
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:23 +03:00
abbdec49e7
change: Rename DuplicatedUser
error to AlreadyRegistered
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:23 +03:00
927a345802
feat: Handle ChatRequest
event
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:23 +03:00
8cc6aef67b
feat: ChatRequest event handler
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:23 +03:00
9dca968b30
feat: Message and ChatRequest events
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:22 +03:00
ff37501b74
feat: New event called ChatRequest
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:22 +03:00
8333a6ba9a
chore: New errors
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:22 +03:00
90cd947e71
feat: New tables utils
...
The tables is:
- `blacklist`
- `incoming_chat_requests`
- `whitelist`
- `outgoing_chat_requests`
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:22 +03:00
4de83b02cd
chore: Functions to send an event to user & check if it is online
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:22 +03:00
b72fb8e7f6
feat: Macro to try the websocket error
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:21 +03:00
226df1961b
chore: Use sea_orm::ModelTrait
in entities prelude
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:21 +03:00
65d6b147d9
chore: Returns database connection as Arc
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:21 +03:00
b4b3b537fd
feat: Websocket error macro
...
`ws_errors` macro to make adding new errors easy
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:21 +03:00
033a21f733
chore: Function to return user by its public key
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:21 +03:00
33b44cb256
chore: Impl AsRef
for ServerEvent
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:20 +03:00
2bac5be8c8
chore: Use entities prelude
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:20 +03:00
b712f96f59
change: Change the user id from integer
to bigint
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:20 +03:00
b899dd6ac5
feat: Whitelist table
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:20 +03:00
9215d836de
feat: Blacklist table
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:20 +03:00
844adbf699
feat: Incoming chat request table
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:19 +03:00
71ae2f9145
feat: Outgoing chat request table
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:19 +03:00
e0a9997d79
chore: Add chrono
to oxidetalis_entitys
dependencies
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-16 17:27:19 +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
7e3558d776
chore: Initialize the project
...
Signed-off-by: Awiteb <a@4rs.nl>
2024-06-26 23:05:17 +03:00