Mercurial > hg > AuthRPC
comparison README.txt @ 17:0dacc8e37fd9 0.0.1a
-
author | Ben Croston <ben@croston.org> |
---|---|
date | Mon, 05 Sep 2011 21:29:46 +0100 |
parents | 686b998428de |
children | 4b62687da58a |
comparison
equal
deleted
inserted
replaced
16:686b998428de | 17:0dacc8e37fd9 |
---|---|
8 | 8 |
9 :: | 9 :: |
10 | 10 |
11 import hashlib | 11 import hashlib |
12 from wsgiref import simple_server | 12 from wsgiref import simple_server |
13 from authrpc.server import AuthRPCApp | 13 from AuthRPC.server import AuthRPCApp |
14 | 14 |
15 def myauth(username, password, useragent): | 15 def myauth(username, password, useragent): |
16 return username == 'myuser' and \ | 16 return username == 'myuser' and \ |
17 password == hashlib.md5('secret').hexdigest() and \ | 17 password == hashlib.md5('secret').hexdigest() and \ |
18 useragent == 'myprogram' | 18 useragent == 'myprogram' |