Services/Authentication: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 11: Line 11:
= Data Model =
= Data Model =


Every user of a services app has two unique identifiers: a username by which they identify themselves, and a userid by which they are identified in persistent storage. The username may be mutable and is selected by the user; the userid is immutable and is generated automatically.
Every user of a services app has the following unique identifiers:
 
* an email address by which they identify themselves, and
* a username, formed by taking the sha1 hash of the email address, and
* a numeric userid by which they are identified in persistent storage.
 
The email address may be mutable and is selected by the user; the userid is immutable and is generated automatically.


In code, the user is represented by a dict of their user data.  It will always include the keys "username" and "userid".  Applications may also arrange for other keys to be loaded into this dict.
In code, the user is represented by a dict of their user data.  It will always include the keys "username" and "userid".  Applications may also arrange for other keys to be loaded into this dict.
Confirmed users
358

edits

Navigation menu