|
- #!/usr/bin/python
- # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*-
-
- from decorators import WSGISimpleAuth # decoratore ( singleton )
- auth = WSGISimpleAuth()
-
- @auth.require()
- def application( environ, start_response ):
- storage = environ['auth.storage']
-
- storage['timeout'] = -1
-
- start_response( '200 OK', [('content-type', 'text/html; charset=utf-8')] )
-
- return [
- "<h5>Now you are logged out</h5>",
- "<a href='/index.html'>index</a>"
- ]
|