added simplistic dictionary_auth example (#105)

This commit is contained in:
Devin Fee
2017-09-19 01:54:37 -07:00
committed by Andrew Svetlov
parent b0895806af
commit 1a9ab6424e
10 changed files with 184 additions and 0 deletions

View 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',)),
]
}