6
1
mirror of https://git.mills.io/saltyim/saltyim.git synced 2024-07-05 09:31:25 +00:00
Commit Graph

14 Commits

Author SHA1 Message Date
James Mills
ddd16c202f Add blob service and support for signing and verifying HTTP requests (#178)
Alternative to #177

The way this works is:

Client:

- Client creates a normal `net/http.Request{}` object using the `Request()` function in `utils.go`. The `http.Request{}` object is then signed using the Client's Ed25519 private key.
- The HTTP Method and Path (_note this is important_) are hashed, as well as the request body (if any) using the FNV128a hashing algorithm.
- This hash is then signed by the Client's's Ed25519 private key.
- The resulting signature is then encoded to Base64 (_standard encoding_) and added to the HTTP headers as a `Signature:` header.
- In addition the Client's Ed25519 public key is added to the HTTP headers as `Signer:`

Server:

- The server calculates the same FNV128a hash of the HTTP Request Method and Path and the body (if any)
- The server decodes the HTTP header `Signature:`
- The server then uses the Client's Ed25519 public key in the HTTP header `Signer:` to verify the signature of the `Signature:` HTTP header which gives us back the original FNV128a hash the Client calculated for the request.
- The server then compares the Client's hash with the expected hash to see if they compare equally.

Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Co-authored-by: Jon Lundy <jon@xuu.cc>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/178
Reviewed-by: xuu <xuu@noreply@mills.io>
2023-01-25 23:05:29 +00:00
xuu
318c3275b5 fix: Make register lookup broker if default to blank (#175)
Co-authored-by: Jon Lundy <jon@xuu.cc>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/175
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-10-15 21:45:13 +00:00
mlctrez
fcc4f53f20 navigation drawer is now fixed for > 900px windows (#157)
Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/157
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-04-07 03:43:09 +00:00
James Mills
832fb124fe Improve the registration process, add feedback to the PWA's UX adn use an API for registration (#147)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/147
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>
2022-04-04 16:04:38 +00:00
James Mills
6a92c9d30a Add support for indexing and persisting inbox index state (#121)
TODO:

- [ ] Remove `replace` directive after testing...

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/121
2022-04-02 14:15:46 +00:00
mlctrez
80b5d42fa4 add register button to configuration page (#114)
Adding a new register button to the configuration page that calls client.Register()

When clicked this button uses the identity stored in the local storage which was created either via new identity or update identity buttons.

All errors are logged to the console.  From my tests, I don't have a salty@mlctrez.com user so it fails looking up the service user to send a message to.

Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/114
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-04-01 02:13:19 +00:00
mlctrez
d6fcad992c new chat should also update contacts (#92)
Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/92
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-03-30 00:35:43 +00:00
James Mills
f9fa628e75 Add support for new contacts appearing in contact list automatically (#89)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/89
2022-03-29 22:06:06 +00:00
mlctrez
969a263d06 support for contacts, multiple chat threads, and persistence (#77)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: James Mills <james@mills.io>
Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/77
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-03-28 21:49:01 +00:00
James Mills
9e9abacf1a pwa: Fix build errors 2022-03-25 15:28:44 +10:00
mlctrez
30d7330503 remove endpoint configuration, no longer used 2022-03-24 18:03:46 -05:00
mlctrez
43f5d14025 Merge branch 'material-design-exp-matt' of ssh://git.mills.io:2222/saltyim/saltyim into material-design-exp-matt 2022-03-24 17:48:51 -05:00
mlctrez
61e3b8e6bd initial work on configuration page 2022-03-24 13:39:38 -05:00
mlctrez
70cbed1fa9 initial work on configuration page 2022-03-24 09:50:51 -05:00