added simplistic dictionary_auth example (#105)
This commit is contained in:
committed by
Andrew Svetlov
parent
b0895806af
commit
1a9ab6424e
10
demo/dictionary_auth/users.py
Normal file
10
demo/dictionary_auth/users.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from collections import namedtuple
|
||||
|
||||
User = namedtuple('User', ['username', 'password', 'permissions'])
|
||||
|
||||
user_map = {
|
||||
user.username: user for user in [
|
||||
User('devin', 'password', ('public',)),
|
||||
User('jack', 'password', ('public', 'protected',)),
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user