diff --git a/xep-0401.xml b/xep-0401.xml index 725e2b6b..1228efb2 100644 --- a/xep-0401.xml +++ b/xep-0401.xml @@ -78,8 +78,8 @@ out-of-band link (URI) which allows Juliet to:

  1. Download an XMPP client (if needed).
  2. -
  3. Register an account on Romeo's server with a user name defined by - Romeo and a password not known to Romeo.
  4. +
  5. Register an account on Romeo's server (with a user name pre-defined + by Romeo or chosen by Juliet, and a password not known to Romeo).
  6. Establish a mutual presence subscription between Romeo and Juliet.
@@ -124,8 +124,21 @@ ]]>

When performing the account creation, Juliet's client needs to ensure - that the server supports the extended IBR protocol with a <preauth> - token: TODO

+ that the server supports the extended IBR protocol, as denoted by the + <register xmlns='urn:xmpp:invite'> + stream feature:

+ + + EXTERNAL + SCRAM-SHA-1-PLUS + SCRAM-SHA-1 + PLAIN + + + + +]]>

OPTIONAL.

@@ -324,87 +337,45 @@

In order to allow invited users to register on a server, the registration processs as defined in &xep0077; needs to be extended. The - invited user's client MUST add a <preauth> element in the 'TODO' - namespace to the 'jabber:iq:register' query in order to inform the - server that it wants to perform Pre-Authenticated IBR:

- - - - + invited user's client needs to connect to the server and check that the + invitation stream feature + (<register xmlns='urn:xmpp:invite'>) is present. + After that, the client initiates the registration flow by sending the + preauth token to the server:

+ + ]]> -

If the server supports and is ready to perform Pre-Authenticated IBR, - it MUST add a <token> element to the response (TODO: 'token' or - 'preauth'?):

- - - - - urn:xmpp:invite:1 - - - - - - - - - - - - - +

Upon receiving the preauth request, the server must validate that the + token is acceptable for account registration. However, single-use tokens + MUST NOT be considered used until the actual registration has succeeded. +

+

In addition, if the token has an expiration time, it MUST only be + checked at this point. Subsequent actions performed by the client during + the current session that require a valid token MUST NOT be rejected due + to token expiry. +

+

If the token is acceptable, the server responds with success, and + indicates the client may now proceed with account registration: +

+ ]]> - - - - - urn:xmpp:invite:1 - - - juliet - - - m1cro$oft - - - BADTOKEN - - - - - - - - -]]> - - - - - urn:xmpp:invite:1 - - - juliet - - - m1cro$oft - - - OLDTOKEN - - - +

If the token provided by the client was unknown, invalid or expired, the + server should return an appropriate error to the client:

+ - - + + The provided token is invalid or expired ]]> +

In the success case, the client proceeds with registration as defined in + &xep0077;. If the token is rejected by the server, the client still MAY + attempt to perform IBR if the server allows that.

+

After the invitee has successfully registered on the inviter's server and roster subscription is enabled for account creation, the server MUST use roster pushes as defined in &rfc6121; ยง2.1.6 in order to inform the