init commit

This commit is contained in:
Andreas Stephanides
2017-01-14 12:23:04 +01:00
commit 8955bf17f5
32 changed files with 1555 additions and 0 deletions

19
users/users.py Normal file
View File

@@ -0,0 +1,19 @@
class User(object):
def __init__(self, id, username, password):
self.id = id
self.username = username
self.password = password
def __str__(self):
return "User(id='%s')" % self.id
user = User(1, 'user', 'password')
def authenticate(username, password):
if username == user.username and password == user.password:
return user
def identity(payload):
return user