-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README for 1.0.0 release
- Loading branch information
Showing
6 changed files
with
72 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
import logging | ||
from wsgi_kerberos import KerberosAuthMiddleware | ||
from wsgiref.simple_server import make_server | ||
|
||
|
||
def example(environ, start_response): | ||
user = environ.get('REMOTE_USER', 'ANONYMOUS') | ||
start_response('200 OK', [('Content-Type', 'text/plain')]) | ||
data = "Hello {}".format(user) | ||
return [data.encode()] | ||
|
||
|
||
application = KerberosAuthMiddleware(example) | ||
|
||
|
||
if __name__ == '__main__': | ||
from wsgiref.simple_server import make_server | ||
from wsgi_kerberos import KerberosAuthMiddleware | ||
from socket import gethostname | ||
import logging | ||
logging.basicConfig(level=logging.DEBUG) | ||
application = KerberosAuthMiddleware(example) | ||
server = make_server(gethostname(), 8080, application) | ||
server = make_server('', 8080, application) | ||
server.serve_forever() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters