|
Revision 61
(checked in by thejimmyg, 2 years ago)
|
Fixed some bugs and introduced a basic test suite
|
| Line | |
|---|
| 1 |
from authkit.authenticate import middleware, sample_app |
|---|
| 2 |
from authkit.authenticate.digest import digest_password |
|---|
| 3 |
|
|---|
| 4 |
def digest(environ, realm, username): |
|---|
| 5 |
password = username |
|---|
| 6 |
return digest_password(realm, username, password) |
|---|
| 7 |
|
|---|
| 8 |
app = middleware( |
|---|
| 9 |
sample_app, |
|---|
| 10 |
setup_method='digest', |
|---|
| 11 |
digest_realm='Test Realm', |
|---|
| 12 |
digest_authenticate_function=digest |
|---|
| 13 |
) |
|---|
| 14 |
|
|---|
| 15 |
if __name__ == '__main__': |
|---|
| 16 |
from paste.httpserver import serve |
|---|
| 17 |
serve(app, host='0.0.0.0', port=8080) |
|---|
| 18 |
|
|---|