README.rst 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. Defaults for SMS originators will not be added to the generated config file, these should be added in the form::
  8. originators.<country code> = <long|short|alpha>:<originator>
  9. Where country code is the numeric country code, or 'default' to specify the originator used for countries not listed. For example, to use a selection of long codes for the US/Canda, a short code for the UK and an alphanumertic originator for everywhere else::
  10. originators.1 = long:12125552368,long:12125552369
  11. originators.44 = short:12345
  12. originators.default = alpha:Matrix
  13. Requests
  14. ========
  15. The requests that synapse servers and clients submit to the identity server are, briefly, as follows:
  16. Request the validation of your email address:
  17. curl -XPOST 'http://localhost:8090/_matrix/identity/api/v1/validate/email/requestToken' -H "Content-Type: application/json" -d '{"email": "matthew@arasphere.net", "client_secret": "abcd", "send_attempt": 1}'
  18. {"success": true, "sid": "1"}
  19. # receive 943258 by mail
  20. Use this code to validate your email address:
  21. curl -XPOST 'http://localhost:8090/_matrix/identity/api/v1/validate/email/submitToken' -H "Content-Type: application/json" -d '{"token": "943258", "sid": "1", "client_secret": "abcd"}'
  22. {"success": true}
  23. Use the validated email address to bind it to a matrix ID:
  24. curl -XPOST 'http://localhost:8090/_matrix/identity/api/v1/3pid/bind' -H "Content-Type: application/json" -d '{"sid": "1", "client_secret": "abcd", "mxid": "%40matthew%3amatrix.org"}'
  25. # lookup:
  26. curl 'http://localhost:8090/_matrix/identity/api/v1/lookup?medium=email&address=henry%40matrix.org'
  27. # fetch pubkey key for a server
  28. curl http://localhost:8090/_matrix/identity/api/v1/pubkey/ed25519