Closed noyainrain closed 9 years ago
Draft:
class Meetling:
"""
.. attribute:: user
Active :class:`User`. ``None`` means anonymous access.
.. attribute:: users
Map of all :class:`User` s.
"""
def authenticate(self, secret):
"""Authenticate an user (device) with *secret*.
If authentication is successful, the identified :class:`User` is returned, ``None``
otherwise."""
def login(self):
"""
.. http:post:: /api/login
Login a new user (device).
An :ref:`User` is created and returned. The user's *auth_secret* attribute can be used for future authentication.
"""
class User(Object):
"""
Meetling user.
.. describe:: auth_secret
Secret used for authentication. Visible only to the user oneself.
.. describe:: create_time
Time the user was created / registered.
.. http:get:: /api/users/(id)
Get the user given by *id*.
"""
Implemented in ff1511e795d432a0504f105874bff5425215a5e6 .
Implement user authentication and login.