1
0

README.rst 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Installation
  2. ============
  3. Dependencies can be installed using setup.py in the same way as synapse: see synapse/README.rst.
  4. Having installed dependencies, you can run sydent using::
  5. $ python -m sydent.sydent
  6. This will create a configuration file in sydent.conf with some defaults. You'll most likely want to change the server name and specify a mail relay.
  7. Requests
  8. ========
  9. The requests that synapse servers and clients submit to the identity server are, briefly, as follows:
  10. Request the validation of your email address:
  11. curl -XPOST 'http://localhost:8090/_matrix/identity/api/v1/validate/email/requestToken' -d'email=matthew@arasphere.net&clientSecret=abcd&sendAttempt=1'
  12. {"success": true, "tokenId": 1}
  13. # receive 943258 by mail
  14. Use this code to validate your email address:
  15. curl -XPOST 'http://localhost:8090/_matrix/identity/api/v1/validate/email/submitToken' -d'token=943258&sid=1&clientSecret=abcd'
  16. {"success": true}
  17. Use the validated email address to bind it to a matrix ID:
  18. curl -XPOST 'http://localhost:8090/_matrix/identity/api/v1/3pid/bind' -d'sid=1&clientSecret=abcd&mxid=%40matthew%3amatrix.org'
  19. # lookup:
  20. curl 'http://localhost:8090/_matrix/identity/api/v1/lookup?medium=email&address=henry%40matrix.org'
  21. # fetch pubkey key for a server
  22. curl http://localhost:8090/_matrix/identity/api/v1/pubkey/ed25519