Labs/Weave/Identity/Account Manager/Spec/Latest: Difference between revisions

Line 184: Line 184:


=== register ===
=== register ===
Establishes a new ID and secret with the domain.  Both usernames and email addresses are supported ID types.
;Required properties
* <tt>id-type:</tt> Type of identifier to use.  Supported types are <tt>'username'</tt> and <tt>'email'</tt>.
;Optional properties
* <tt>params:</tt>
** <tt>id:</tt> The parameter name to send the ID in. Defaults to <tt>'id'</tt>.
** <tt>secret:</tt> The parameter name to send the secret in. Defaults to <tt>'secret'</tt>.
* <tt>secret-type:</tt> Type of secret to use. The only supported type at this time is <tt>'random'</tt>, which is the default.
* <tt>secret-maxlength:</tt> How many characters long the secret should be.  Defaults to 16.
* <tt>onsuccess: ''status-action''</tt>
* <tt>onfailure: ''status-action''</tt>
;Response interpretation
* A 2xx response is a success, the user agent SHOULD save the ID and secret for future use, and it MUST execute the <tt>onsuccess</tt> status action, if present.
* A 4xx response is a verification failure; the user agent SHOULD, if possible, attempt to address the problem and retry the query.  Note that the <tt>onfailure</tt> status action should ''not'' be executed in this case.
* Any other response, or upon any verification failure that the user agent cannot correct, the user agent MUST execute the <tt>onfailure</tt> status action, if present.  Otherwise, it SHOULD reload the current page.


=== changepassword ===
=== changepassword ===
946

edits