You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
484 B

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