Uploaded image for project: 'mod_python'
  1. mod_python
  2. MODPYTHON-27

mod_python.publisher authentication

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.4
    • 3.3.1
    • publisher
    • None

    Description

      The documentation for mod_python.publisher gives that more specific authentication
      check can be performed on a function by using code:

      def sensitive(req):

      def _auth_(req, user, password):
      if user == 'spam' and password == 'eggs':

      1. let them in
        return 1
        else:
      2. no access
        return 0
      1. something involving sensitive information
        return 'sensitive information`

      Ie., authentication function can be nested inside the actual function.

      This only works for functions and not methods of a class. Thus, code could be enhanced
      to allow it to work for MethodType as well as FunctionType. Method that needs to be
      changed is process_auth() and it simply needs to track through im_func to get to the
      func_code member.

      Attachments

        Activity

          People

            grahamd Graham Phillip Dumpleton
            grahamd Graham Phillip Dumpleton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: