Skip to content

Commit

Permalink
add simple_login to backend interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Niall O'Higgins committed Jul 31, 2011
1 parent 27ea572 commit 08de3d6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pyramid_registration/interfaces.py
Expand Up @@ -42,3 +42,17 @@ def issue_access_token(self, user_id):
``user_id``
The user_id of the account to issue the token for.
"""

def simple_login(self, username_or_email, password):
""" Look up a user by either username or email, if it exists
check the password against the hashed password in the database.
If credentials are valid and user exists and is enabled, return a True
value. Otherwise, return False.
``username_or_email``
A string containing either a username or email for this account.
``password``
A string containing the plaintext password for this account.
"""

0 comments on commit 08de3d6

Please sign in to comment.