Skip to content

Commit

Permalink
Update from mainstream (#1)
Browse files Browse the repository at this point in the history
* Change README examples from camelcase to underscore because e39348e

* Change README example from tokenId to sid because 056a3e9

* Change README sid example from int to string because ea73b0a

* Remove IP address from verification emails

because its wrong, since requests are now proxied through the HS

* Fix README examples to be JSON

Rather than deprecated x-form-www-urlencoded

* Proposed wording change - vastly more words to fix element-hq/element-web#2547

* A few very minor punctuation/wording tweaks

* Adding some more words to the matrix registration email template, too.
  • Loading branch information
slipeer authored Apr 10, 2017
1 parent 0f27cac commit 0c10428
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 26 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ The requests that synapse servers and clients submit to the identity server are,

Request the validation of your email address:

curl -XPOST 'http://localhost:8090/_matrix/identity/api/v1/validate/email/requestToken' -d'email=matthew@arasphere.net&clientSecret=abcd&sendAttempt=1'
{"success": true, "tokenId": 1}
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}'
{"success": true, "sid": "1"}

# receive 943258 by mail

Use this code to validate your email address:

curl -XPOST 'http://localhost:8090/_matrix/identity/api/v1/validate/email/submitToken' -d'token=943258&sid=1&clientSecret=abcd'
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"}'
{"success": true}

Use the validated email address to bind it to a matrix ID:

curl -XPOST 'http://localhost:8090/_matrix/identity/api/v1/3pid/bind' -d'sid=1&clientSecret=abcd&mxid=%40matthew%3amatrix.org'
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"}'

# lookup:

Expand Down
39 changes: 31 additions & 8 deletions res/verification_template.eml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,28 @@ Content-Disposition: inline
Hello,
We have received a request from %(ipaddress)s to use this email address
with a matrix.org identity server. If this was you who made this request,
you may use the following link to complete the verification of your email
address:
We have received a request to use this email address with a matrix.org identity
server. If this was you who made this request, you may use the following link
to complete the verification of your email address:
%(link)s
If your client requires a code, the code is %(token)s
If you aren't aware of making such a request, please disregard this email.
About Matrix:
Matrix is an open standard for interoperable, decentralised, real-time communication
over IP. It can be used to power Instant Messaging, VoIP/WebRTC signalling, Internet
of Things communication - or anywhere you need a standard HTTP API for publishing and
subscribing to data whilst tracking the conversation history.
Matrix defines the standard, and provides open source reference implementations of
Matrix-compatible Servers, Clients, Client SDKs and Application Services to help you
create new communication solutions or extend the capabilities and reach of existing ones.
--7REaIwWQCioQ6NaBlAQlg8ztbUQj6PKJ
Content-Type: text/html; charset=UTF-8
Content-Disposition: inline
Expand All @@ -44,10 +55,9 @@ body {
<body>
<p>Hello,</p>

<p>We have received a request from %(ipaddress)s to use this email address
with a matrix.org identity server. If this was you who made this request,
you may use the following link to complete the verification of your email
address:</p>
<p>We have received a request to use this email address with a matrix.org
identity server. If this was you who made this request, you may use the
following link to complete the verification of your email address:</p>

<p><a href="%(link)s">Complete email verification</a></p>

Expand All @@ -59,6 +69,19 @@ address:</p>

<p>If you aren't aware of making such a request, please disregard this
email.</p>

<br>
<p>About Matrix:</p>

<p>Matrix is an open standard for interoperable, decentralised, real-time communication
over IP. It can be used to power Instant Messaging, VoIP/WebRTC signalling, Internet
of Things communication - or anywhere you need a standard HTTP API for publishing and
subscribing to data whilst tracking the conversation history.</p>

<p>Matrix defines the standard, and provides open source reference implementations of
Matrix-compatible Servers, Clients, Client SDKs and Application Services to help you
create new communication solutions or extend the capabilities and reach of existing ones.</p>

</body>
</html>

Expand Down
74 changes: 60 additions & 14 deletions res/verification_template_vector.eml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,46 @@ Content-Type: multipart/alternative;
Content-Type: text/plain; charset=UTF-8
Content-Disposition: inline
Hello,
Hello there!
We have received a request from %(ipaddress)s to register this email address
on riot.im. If this was you who made this request, you may use the
following link to complete the verification of your email address:
You have asked us to register this email address with riot.im - the open source,
distributed and secure shared workspace for the web that's built on Matrix.
If it was really you who made this request, you can click on the following link to
complete the verification of your email address:
%(link)s
Please note that you will need to use Chrome, Firefox or Safari on the web, or
iOS or Android on mobile.
If you aren't aware of making such a request, please disregard this email.
If you didn't make this request, you can safely disregard this email.
thanks,
Thanks!
Riot
About Riot:
Break through - Riot allows teams to communicate across a wide range of collaboration
apps. If some team members use Riot while others use IRC, Slack or Gitter, Riot will
allow these team members to seamlessly work together. Riot offers the richest
network of communication bridges.
Own Your Own Data - No one should control your communication and data but you. Riot
lets you run your own server, and provides users and teams with the most advanced
crypto ratchet technology available today for a decentralized secure Internet.
Open Source - Riot is entirely open source: all the code is published on GitHub
(Apache License) for anyone to see and extend. This means teams can customize or
contribute to the code and everyone can benefit from the speed of community innovation.
Made on Matrix - Riot is built on top of Matrix. Matrix is an open network for secure,
decentralized communication delivering a community of users, bridged networks,
integrated bots and applications plus full end-to-end encryption. To learn more about
Matrix visit https://matrix.org.
--7REaIwWQCioQ6NaBlAQlg8ztbUQj6PKJ
Content-Type: multipart/related;
boundary="M3yzHl5YZehm9v4bAM8sKEdcOoVnRnKR";
Expand Down Expand Up @@ -78,6 +101,7 @@ pre, code {
border-bottom: 4px solid #e4f7ed ! important;
}
.notif_link a, .footer a {
color: #76CFA6 ! important;
}
Expand All @@ -98,12 +122,13 @@ pre, code {
</tr>
</table>

<p>Hello,</p>
<p>Hello there!</p>

<p>We have received a request from %(ipaddress)s to register this email
address on riot.im. If this was you who made this request, you may use
the following link to complete the verification of your email
address:</p>
<p>You have asked us to register this email address with riot.im - the open source,
distributed and secure shared workspace for the web that's built on Matrix.</p>

<p>If it was really you who made this request, you can click on the following link to
complete the verification of your email address:</p>

<p><a href="%(link)s">Complete email verification</a></p>

Expand All @@ -113,12 +138,33 @@ pre, code {
<a href="https://www.apple.com/safari">Safari</a> on the web,
or iOS or Android on mobile.</p>

<p>If you aren't aware of making such a request, please disregard this
email.</p>
<p>If you didn't make this request, you can safely disregard this email.</p>

<p>thanks,</p>
<p>Thanks!</p>

<p>Riot</p>

<br>
<p>About Riot:</p>

<p><em>Break through</em> - Riot allows teams to communicate across a wide range of collaboration
apps. If some team members use Riot while others use IRC, Slack or Gitter, Riot will
allow these team members to seamlessly work together. Riot offers the richest
network of communication bridges.</p>

<p><em>Own Your Own Data</em> - No one should control your communication and data but you. Riot
lets you run your own server, and provides users and teams with the most advanced
crypto ratchet technology available today for a decentralized secure Internet.</p>

<p><em>Open Source</em> - Riot is entirely open source: all the code is published on GitHub
(Apache License) for anyone to see and extend. This means teams can customize or
contribute to the code and everyone can benefit from the speed of community innovation.</p>

<p><em>Made on Matrix</em> - Riot is built on top of Matrix. Matrix is an open network for secure,
decentralized communication delivering a community of users, bridged networks,
integrated bots and applications plus full end-to-end encryption. To learn more about
Matrix visit https://matrix.org.</p>

</td>
<td> </td>
</tr>
Expand Down

0 comments on commit 0c10428

Please sign in to comment.