[Repoze-checkins] r839 - in repoze.who/trunk: . repoze/pam repoze/who repoze/who/etc repoze/who/plugins

Chris McDonough chrism at agendaless.com
Wed Mar 19 14:10:23 EDT 2008


Author: Chris McDonough <chrism at agendaless.com>
Date: Wed Mar 19 14:10:23 2008
New Revision: 839

Log:
Renaming: repoze.pam is now repoze.who.


Added:
   repoze.who/trunk/repoze/who/
      - copied from r838, /repoze.who/trunk/repoze/pam/
Removed:
   repoze.who/trunk/repoze/pam/
Modified:
   repoze.who/trunk/CHANGES.txt
   repoze.who/trunk/README.txt
   repoze.who/trunk/repoze/who/classifiers.py
   repoze.who/trunk/repoze/who/etc/sample-config.ini
   repoze.who/trunk/repoze/who/interfaces.py
   repoze.who/trunk/repoze/who/middleware.py
   repoze.who/trunk/repoze/who/plugins/auth_tkt.py
   repoze.who/trunk/repoze/who/plugins/basicauth.py
   repoze.who/trunk/repoze/who/plugins/cookie.py
   repoze.who/trunk/repoze/who/plugins/form.py
   repoze.who/trunk/repoze/who/plugins/htpasswd.py
   repoze.who/trunk/repoze/who/plugins/sql.py
   repoze.who/trunk/repoze/who/tests.py
   repoze.who/trunk/setup.py

Modified: repoze.who/trunk/CHANGES.txt
==============================================================================
--- repoze.who/trunk/CHANGES.txt	(original)
+++ repoze.who/trunk/CHANGES.txt	Wed Mar 19 14:10:23 2008
@@ -1,5 +1,7 @@
 Unreleased
 
+ - Renaming: repoze.pam is now repoze.who
+
  - Bump ez_setup.py version.
 
  - Add IMetadataProvider plugin type.  Chris says 'Whit rules'.

Modified: repoze.who/trunk/README.txt
==============================================================================
--- repoze.who/trunk/README.txt	(original)
+++ repoze.who/trunk/README.txt	Wed Mar 19 14:10:23 2008
@@ -1,34 +1,30 @@
-repoze.pam
+repoze.who
 
 Overview
 
-  repoze.pam (Pluggable Authentication Middleware) is an
-  identification and authentication framework for WSGI. 
+  repoze.who is an identification and authentication framework for
+  WSGI.
 
 Description
 
-  repoze.pam's ideas are largely culled from Zope 2's Pluggable
-  Authentication Service (PAS) (but repoze.pam is not dependent on
-  Zope 2 in any way).  Unlike PAS, it provides no facilities for
-  creating user objects, assigning roles or groups to users,
-  retrieving or changing user properties, or enumerating users,
-  groups, or roles.  These responsibilities are assumed to be the
-  domain of the WSGI application you're serving.  It also provides no
-  facility for authorization (ensuring whether a user can or cannot
-  perform the operation implied by the request).  This is also the
-  domain of the WSGI application.
+  repoze.who's ideas are largely culled from Zope 2's Pluggable
+  Authentication Service (PAS) (but repoze.who is not dependent on
+  Zope 2 in any way).  It provides no facility for authorization
+  (ensuring whether a user can or cannot perform the operation implied
+  by the request).  This is considered to be the domain of the WSGI
+  application.
  
   It attemtps to reuse implementations from paste.auth for some of its
   functionality.
 
 Middleware Responsibilities
 
-  repoze.pam's middleware has one major function on ingress: it
+  repoze.who's middleware has one major function on ingress: it
   conditionally places identification and authentication information
   (including a REMOTE_USER value) into the WSGI environment and allows
   the request to continue to a downstream WSGI application.
 
-  repoze.pam's middleware has one major function on egress: it
+  repoze.who's middleware has one major function on egress: it
   examines the headers set by the downstream application, the WSGI
   environment, or headers supplied by other plugins and conditionally
   challenges for credentials.
@@ -37,38 +33,38 @@
 
 Classifiers
 
-  repoze.pam "classifies" the request on middleware ingress.  Request
+  repoze.who "classifies" the request on middleware ingress.  Request
   classification happens before identification and authentication.  A
   request from a browser might be classified a different way that a
-  request from an XML-RPC client.  repoze.pam uses request classifiers
+  request from an XML-RPC client.  repoze.who uses request classifiers
   to decide which other components to consult during subsequent
   identification, authentication, and challenge steps.  Plugins are
   free to advertise themselves as willing to participate in
   identification and authorization for a request based on this
   classification.
 
-  The classification system is pluggable.  repoze.pam provides a
+  The classification system is pluggable.  repoze.who provides a
   default classifier that you may use.  You may extend the
-  classification system by making repoze.pam aware of a different
+  classification system by making repoze.who aware of a different
   classifier implementation.
 
 Plugins
 
-  repoze.pam is designed around the concept of plugins.  Plugins are
+  repoze.who is designed around the concept of plugins.  Plugins are
   instances that are willing to perform one or more identification-
   and/or authentication-related duties.  When you register a plugin,
   you register a plugin factory, which is a callable that accepts
   configuration parameters.  The callable must return an instance of a
   plugin when called.  Each plugin can be configured arbitrarily using
-  values in a repoze.pam-specific configuration file.
+  values in a repoze.who-specific configuration file.
 
-  repoze.pam consults the set of configured plugins when it intercepts
+  repoze.who consults the set of configured plugins when it intercepts
   a WSGI request, and gives some subset of them a chance to influence
   what is added to the WSGI environment.
 
 Request (Ingress) Stages
 
-  repoze.pam performs the following operations in the following order
+  repoze.who performs the following operations in the following order
   during middleware ingress:
 
   1.  Request Classification
@@ -113,7 +109,7 @@
 
 Response (Egress) Stages
 
-  repoze.pam performs the following operations in the following order
+  repoze.who performs the following operations in the following order
   during middleware egress:
 
   1.  Challenge Decision
@@ -132,7 +128,7 @@
       a challenge.  A challenger plugin can use application-returned
       headers, the WSGI environment, and other items to determine what
       sort of operation should be performed to actuate the challenge.
-      Note that repoze.pam defers to the identifier plugin which
+      Note that repoze.who defers to the identifier plugin which
       provided the identity (if any) to reset credentials at challenge
       time; this is not the responsibility of the challenger.
 
@@ -161,7 +157,7 @@
     downstream WSGI applications in the "REMOTE_USER' environment
     variable.  Additionally, the "identity" of the user (as provided
     by the identifier from whence the identity came) is passed along
-    to downstream application in the 'repoze.pam.identity' environment
+    to downstream application in the 'repoze.who.identity' environment
     variable.
 
   Metadata Provider Plugins
@@ -176,14 +172,14 @@
 
     You may register a plugin as willing to act as a "challenger".
     Challenger plugins are responsible for initiating a challenge to
-    the requesting user.  Challenger plugins are invoked by repoze.pam
+    the requesting user.  Challenger plugins are invoked by repoze.who
     when it decides a challenge is necessary. A challenge might
     consist of displaying a form or presenting the user with a basic
     or digest authentication dialog.
 
 Configuration File Example
 
-  repoze.pam is configured using a ConfigParser-style .INI file.  The
+  repoze.who is configured using a ConfigParser-style .INI file.  The
   configuration file has five main types of sections: plugin sections,
   a general section, an identifiers section, an authenticators section,
   and a challengers section.  Each "plugin" section defines a
@@ -192,18 +188,18 @@
   form a site configuration.  The general section is general middleware
   configuration.
 
-Example repoze.pam Configuration File (*NOTE: SCIENCE FICTION, not yet
+Example repoze.who Configuration File (*NOTE: SCIENCE FICTION, not yet
 implemented!*)
 
-  repoze.pam is designed to be used within a PasteDeploy configuration
+  repoze.who is designed to be used within a PasteDeploy configuration
   file:
 
-    [filter:pam]
-    use = egg:repoze.pam#pam
-    config_file = %(here)s/pam.ini
+    [filter:who]
+    use = egg:repoze.who#who
+    config_file = %(here)s/who.ini
 
   Below is an example of a configuration file that might be used to
-  configure the repoze.pam middleware.  A set of plugins are defined,
+  configure the repoze.who middleware.  A set of plugins are defined,
   and they are referred to by following non-plugin sections.
 
   In the below configuration, five plugins are defined.  The form, and
@@ -214,46 +210,46 @@
 
     [plugin:form]
     # identificaion and challenge
-    use = egg:repoze.pam#form
+    use = egg:repoze.who#form
     login_form_qs = __do_login
     rememberer_name = cookie
     form = %(here)s/login_form.html
 
     [plugin:cookie]
     # identification
-    use = egg:repoze.pam#cookie
-    cookie_name = repoze.pam.auth
+    use = egg:repoze.who#cookie
+    cookie_name = repoze.who.auth
 
     [plugin:basicauth]
     # identification and challenge
-    use = egg:repoze.pam#basicauth
+    use = egg:repoze.who#basicauth
     realm = repoze
 
     [plugin:htpasswd]
     # authentication
-    use = egg:repoze.pam#htpasswd
+    use = egg:repoze.who#htpasswd
     filename = %(here)s/users.htpasswd
-    check_fn = egg:repoze.pam#crypt_check
+    check_fn = egg:repoze.who#crypt_check
 
     [plugin:sqlusers]
     # authentication
-    use = egg:repoze.pam#squsersource
+    use = egg:repoze.who#squsersource
     db = sqlite://database?user=foo&pass=bar
     get_userinfo = select id, password from users
-    check_fn = egg:repoze.pam#crypt_check
+    check_fn = egg:repoze.who#crypt_check
 
     [plugin:properties]
-    use = egg:repoze.pam#ini_metadata
+    use = egg:repoze.who#ini_metadata
     filename = %(here)s/etc/properties.ini
-    handler = egg:repoze.pam#ini_default
+    handler = egg:repoze.who#ini_default
 
     [plugin:roles]
-    use = egg:repoze.pam#ini_metadata
+    use = egg:repoze.who#ini_metadata
     filename = %(here)s/etc/roles.ini
 
     [general]
-    request_classifier = egg:repoze.pam#defaultrequestclassifier
-    challenge_decider = egg:repoze.pam#defaultchallengedecider
+    request_classifier = egg:repoze.who#defaultrequestclassifier
+    challenge_decider = egg:repoze.who#defaultchallengedecider
 
     [identifiers]
     # plugin_name:classifier_name:.. or just plugin_name (good for any)
@@ -387,7 +383,7 @@
   Note that the plugin implements three "interface" methods:
   "identify", "forget" and "remember".  The formal specification for
   the arguments and return values expected from these methods are
-  available in the "interfaces.py" file in repoze.pam as the
+  available in the "interfaces.py" file in repoze.who as the
   'IIdentifier' interface, but let's examine them less formally one at
   a time.
 
@@ -426,7 +422,7 @@
     identity.  If the identifier plugin knows that the identity is
     "good" (e.g. in the case of ticket-based authentication where the
     userid is embedded into the ticket), it can insert a special key
-    into the identity dictionary: 'repoze.pam.userid'.  If this key is
+    into the identity dictionary: 'repoze.who.userid'.  If this key is
     present in the identity dictionary, no authenticators will be
     asked to authenticate the identity.  This effectively alllows an
     IIdentifier plugin to become an IAuthenticator plugin when
@@ -468,7 +464,7 @@
 
     Eventually the WSGI application we're serving will issue a "401
     Unauthorized" or another status signifying that the request could
-    not be authorized.  repoze.pam intercepts this status and calls
+    not be authorized.  repoze.who intercepts this status and calls
     IIdentifier plugins asking them to "forget" the credentials
     implied by the identity.  It is the "forget" method's job at this
     point to return HTTP headers that will effectively clear any
@@ -530,7 +526,7 @@
   Note that the plugin implements a single "interface" method:
   "authenticate".  The formal specification for the arguments and
   return values expected from this method is available in the
-  "interfaces.py" file in repoze.pam as the 'IAuthenticator'
+  "interfaces.py" file in repoze.who as the 'IAuthenticator'
   interface, but we can explore this a little further here.
 
   The 'authenticate' method accepts two arguments: the WSGI
@@ -577,8 +573,8 @@
   Note that the plugin implements a single "interface" method:
   "challenge".  The formal specification for the arguments and return
   values expected from this method is available in the "interfaces.py"
-  file in repoze.pam as the 'IChallenger' interface.  This method is
-  called when repoze.pam determines that the application has returned
+  file in repoze.who as the 'IChallenger' interface.  This method is
+  called when repoze.who determines that the application has returned
   an "unauthorized" response (e.g. a 401).  Only one challenger will
   be consulted during "egress" as necessary (the first one to return a
   non-None response).  The challenge method takes environ (the WSGI
@@ -620,5 +616,5 @@
 
 Interfaces
 
-  See the module repoze.pam.interfaces.
+  See the module repoze.who.interfaces.
 

Modified: repoze.who/trunk/repoze/who/classifiers.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/classifiers.py	(original)
+++ repoze.who/trunk/repoze/who/classifiers.py	Wed Mar 19 14:10:23 2008
@@ -3,8 +3,8 @@
 from paste.httpheaders import CONTENT_TYPE
 
 import zope.interface
-from repoze.pam.interfaces import IRequestClassifier
-from repoze.pam.interfaces import IChallengeDecider
+from repoze.who.interfaces import IRequestClassifier
+from repoze.who.interfaces import IChallengeDecider
 
 _DAV_METHODS = (
     'OPTIONS',

Modified: repoze.who/trunk/repoze/who/etc/sample-config.ini
==============================================================================
--- /repoze.who/trunk/repoze/pam/etc/sample-config.ini	(original)
+++ repoze.who/trunk/repoze/who/etc/sample-config.ini	Wed Mar 19 14:10:23 2008
@@ -1,35 +1,35 @@
 [plugin:form]
 # identification and challenge
-use = egg:repoze.pam#form
+use = egg:repoze.who#form
 login_form_qs = __do_login
 identifier_impl_name = cookie
 
 [plugin:cookie]
 # identification
-use = egg:repoze.pam#cookie
-cookie_name = repoze.pam.auth
+use = egg:repoze.who#cookie
+cookie_name = repoze.who.auth
 
 [plugin:basicauth]
 # identification and challenge
-use = egg:repoze.pam#basicauth
+use = egg:repoze.who#basicauth
 realm = repoze
 
 [plugin:htpasswd]
 # authentication
-use = egg:repoze.pam#htpasswd
+use = egg:repoze.who#htpasswd
 filename = %(here)s/users.htpasswd
-check_fn = egg:repoze.pam#crypt_check
+check_fn = egg:repoze.who#crypt_check
 
 [plugin:sqlusers]
 # authentication
-use = egg:repoze.pam#squsersource
+use = egg:repoze.who#squsersource
 db = sqlite://database?user=foo&pass=bar
 get_userinfo = select id, password from users
-check_fn = egg:repoze.pam#crypt_check
+check_fn = egg:repoze.who#crypt_check
 
 [general]
-request_classifier = egg:repoze.pam#defaultrequestclassifier
-challenge_decider = egg:repoze.pam#defaultchallengedecider
+request_classifier = egg:repoze.who#defaultrequestclassifier
+challenge_decider = egg:repoze.who#defaultchallengedecider
 
 [identifiers]
 # plugin_name:classifier_name:.. or just plugin_name (good for any)

Modified: repoze.who/trunk/repoze/who/interfaces.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/interfaces.py	(original)
+++ repoze.who/trunk/repoze/who/interfaces.py	Wed Mar 19 14:10:23 2008
@@ -64,7 +64,7 @@
           'preauthenticated' (e.g. if the userid is embedded in the
           identity, such as when we're using ticket-based
           authentication), the plugin should set the userid in the
-          special 'repoze.pam.userid' key; no authenticators will be
+          special 'repoze.who.userid' key; no authenticators will be
           asked to authenticate the identity thereafer.
 
         o Return None to indicate that the plugin found no appropriate

Modified: repoze.who/trunk/repoze/who/middleware.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/middleware.py	(original)
+++ repoze.who/trunk/repoze/who/middleware.py	Wed Mar 19 14:10:23 2008
@@ -3,13 +3,13 @@
 import sys
 from zope.interface.adapter import AdapterRegistry
 from zope.interface.interface import adapter_hooks
-from repoze.pam.interfaces import IIdentifier
-from repoze.pam.interfaces import IAuthenticator
-from repoze.pam.interfaces import IChallenger
-from repoze.pam.interfaces import IMetadataProvider
+from repoze.who.interfaces import IIdentifier
+from repoze.who.interfaces import IAuthenticator
+from repoze.who.interfaces import IChallenger
+from repoze.who.interfaces import IMetadataProvider
 
-_STARTED = '-- repoze.pam request started --'
-_ENDED = '-- repoze.pam request ended --'
+_STARTED = '-- repoze.who request started --'
+_ENDED = '-- repoze.who request ended --'
 
 class PluggableAuthenticationMiddleware(object):
     def __init__(self, app,
@@ -37,7 +37,7 @@
             fmt = '%(asctime)s %(message)s'
             formatter = logging.Formatter(fmt)
             handler.setFormatter(formatter)
-            self.logger = logging.Logger('repoze.pam')
+            self.logger = logging.Logger('repoze.who')
             self.logger.addHandler(handler)
             self.logger.setLevel(log_level)
 
@@ -47,8 +47,8 @@
             # already set
             return self.app(environ, start_response)
 
-        environ['repoze.pam.plugins'] = self.name_registry
-        environ['repoze.pam.logger'] = self.logger
+        environ['repoze.who.plugins'] = self.name_registry
+        environ['repoze.who.logger'] = self.logger
 
         logger = self.logger
         logger and logger.info(_STARTED)
@@ -79,9 +79,9 @@
                 # application can mutate it to do an 'identity reset'
                 # as necessary, e.g. identity['login'] = 'foo',
                 # identity['password'] = 'bar'
-                environ['repoze.pam.identity'] = identity
+                environ['repoze.who.identity'] = identity
                 metadata = self.gather_metadata(environ, classification, userid)
-                identity['repoze.pam.metadata'] = metadata
+                identity['repoze.who.metadata'] = metadata
                 # set the REMOTE_USER
                 environ[self.remote_user_key] = userid
         else:
@@ -183,7 +183,7 @@
                         'userid returned from %s: "%s"' % (plugin, userid))
 
                     # stamp the identity with the userid
-                    identity['repoze.pam.userid'] = userid
+                    identity['repoze.who.userid'] = userid
                     rank = (auth_rank, identifier_rank)
                     results.append(
                         (rank, plugin, identifier, identity, userid)
@@ -206,13 +206,13 @@
         identifier_rank = 0
         for thing in identities:
             identifier, identity = thing
-            userid = identity.get('repoze.pam.userid')
+            userid = identity.get('repoze.who.userid')
             if userid is not None:
                 # the identifier plugin has already authenticated this
                 # user (domain auth, auth ticket, etc)
                 logger and logger.info(
                   'userid preauthenticated by %s: "%s" '
-                  '(repoze.pam.userid set)' % (identifier, userid)
+                  '(repoze.who.userid set)' % (identifier, userid)
                   )
                 rank = (0, identifier_rank)
                 results.append(
@@ -308,26 +308,26 @@
     """ Functionally equivalent to
 
     [plugin:form]
-    use = repoze.pam.plugins.form.FormPlugin
+    use = repoze.who.plugins.form.FormPlugin
     rememberer_name = cookie
     login_form_qs=__do_login
 
     [plugin:cookie]
-    use = repoze.pam.plugins.cookie:InsecureCookiePlugin
+    use = repoze.who.plugins.cookie:InsecureCookiePlugin
     cookie_name = oatmeal
 
     [plugin:basicauth]
-    use = repoze.pam.plugins.basicauth.BasicAuthPlugin
-    realm = repoze.pam
+    use = repoze.who.plugins.basicauth.BasicAuthPlugin
+    realm = repoze.who
 
     [plugin:htpasswd]
-    use = repoze.pam.plugins.htpasswd.HTPasswdPlugin
+    use = repoze.who.plugins.htpasswd.HTPasswdPlugin
     filename = <...>
-    check_fn = repoze.pam.plugins.htpasswd:crypt_check
+    check_fn = repoze.who.plugins.htpasswd:crypt_check
 
     [general]
-    request_classifier = repoze.pam.classifiers:default_request_classifier
-    challenge_decider = repoze.pam.classifiers:default_challenge_decider
+    request_classifier = repoze.who.classifiers:default_request_classifier
+    challenge_decider = repoze.who.classifiers:default_challenge_decider
 
     [identifiers]
     plugins = form:browser cookie basicauth
@@ -339,11 +339,11 @@
     plugins = form:browser basicauth
     """
     # be able to test without a config file
-    from repoze.pam.plugins.basicauth import BasicAuthPlugin
-    from repoze.pam.plugins.auth_tkt import AuthTktCookiePlugin
-    from repoze.pam.plugins.cookie import InsecureCookiePlugin
-    from repoze.pam.plugins.form import FormPlugin
-    from repoze.pam.plugins.htpasswd import HTPasswdPlugin
+    from repoze.who.plugins.basicauth import BasicAuthPlugin
+    from repoze.who.plugins.auth_tkt import AuthTktCookiePlugin
+    from repoze.who.plugins.cookie import InsecureCookiePlugin
+    from repoze.who.plugins.form import FormPlugin
+    from repoze.who.plugins.htpasswd import HTPasswdPlugin
     io = StringIO()
     salt = 'aa'
     for name, password in [ ('admin', 'admin'), ('chris', 'chris') ]:
@@ -352,7 +352,7 @@
     def cleartext_check(password, hashed):
         return password == hashed
     htpasswd = HTPasswdPlugin(io, cleartext_check)
-    basicauth = BasicAuthPlugin('repoze.pam')
+    basicauth = BasicAuthPlugin('repoze.who')
     auth_tkt = AuthTktCookiePlugin('secret', 'auth_tkt')
     cookie = InsecureCookiePlugin('oatmeal')
     form = FormPlugin('__do_login', rememberer_name='auth_tkt')
@@ -361,11 +361,11 @@
     identifiers = [('form', form),('auth_tkt',auth_tkt),('basicauth',basicauth)]
     authenticators = [('htpasswd', htpasswd)]
     challengers = [('form',form), ('basicauth',basicauth)]
-    from repoze.pam.classifiers import default_request_classifier
-    from repoze.pam.classifiers import default_challenge_decider
+    from repoze.who.classifiers import default_request_classifier
+    from repoze.who.classifiers import default_challenge_decider
     log_stream = sys.stdout
     import os
-    if os.environ.get('NO_PAM_LOG'):
+    if os.environ.get('NO_WHO_LOG'):
         log_stream = None
     mdproviders = []
     middleware = PluggableAuthenticationMiddleware(
@@ -411,7 +411,7 @@
     """ dict subclass that prevents its members from being rendered
     during print """
     def __repr__(self):
-        return '<repoze.pam identity (hidden, dict-like) at %s>' % id(self)
+        return '<repoze.who identity (hidden, dict-like) at %s>' % id(self)
     __str__ = __repr__
 
 

Modified: repoze.who/trunk/repoze/who/plugins/auth_tkt.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/plugins/auth_tkt.py	(original)
+++ repoze.who/trunk/repoze/who/plugins/auth_tkt.py	Wed Mar 19 14:10:23 2008
@@ -3,7 +3,7 @@
 
 from zope.interface import implements
 
-from repoze.pam.interfaces import IIdentifier
+from repoze.who.interfaces import IIdentifier
 
 class AuthTktCookiePlugin(object):
 
@@ -44,7 +44,7 @@
         environ['AUTH_TYPE'] = 'cookie'
         identity = {}
         identity['timestamp'] = timestamp
-        identity['repoze.pam.userid'] = userid
+        identity['repoze.who.userid'] = userid
         identity['tokens'] = tokens
         identity['userdata'] = user_data
         return identity
@@ -84,24 +84,24 @@
             except auth_tkt.BadTicket:
                 pass
 
-        pam_userid = identity['repoze.pam.userid']
-        pam_tokens = identity.get('tokens', '')
-        pam_userdata = identity.get('userdata', '')
+        who_userid = identity['repoze.who.userid']
+        who_tokens = identity.get('tokens', '')
+        who_userdata = identity.get('userdata', '')
         
         if not isinstance(tokens, basestring):
             tokens = ','.join(tokens)
-        if not isinstance(pam_tokens, basestring):
-            pam_tokens = ','.join(pam_tokens)
+        if not isinstance(who_tokens, basestring):
+            who_tokens = ','.join(who_tokens)
         old_data = (userid, tokens, userdata)
-        new_data = (pam_userid, pam_tokens, pam_userdata)
+        new_data = (who_userid, who_tokens, who_userdata)
 
         if old_data != new_data:
             ticket = auth_tkt.AuthTicket(
                 self.secret,
-                pam_userid,
+                who_userid,
                 remote_addr,
-                tokens=pam_tokens,
-                user_data=pam_userdata,
+                tokens=who_tokens,
+                user_data=who_userdata,
                 cookie_name=self.cookie_name,
                 secure=self.secure)
             new_cookie_value = ticket.cookie_value()
@@ -114,7 +114,7 @@
     def __repr__(self):
         return '<%s %s>' % (self.__class__.__name__, id(self))
 
-def make_plugin(pam_conf, secret=None,
+def make_plugin(who_conf, secret=None,
                 cookie_name='auth_tkt',
                 secure=False, include_ip=False):
     if secret is None:

Modified: repoze.who/trunk/repoze/who/plugins/basicauth.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/plugins/basicauth.py	(original)
+++ repoze.who/trunk/repoze/who/plugins/basicauth.py	Wed Mar 19 14:10:23 2008
@@ -6,8 +6,8 @@
 
 from zope.interface import implements
 
-from repoze.pam.interfaces import IIdentifier
-from repoze.pam.interfaces import IChallenger
+from repoze.who.interfaces import IIdentifier
+from repoze.who.interfaces import IChallenger
 
 class BasicAuthPlugin(object):
 
@@ -61,7 +61,7 @@
     def __repr__(self):
         return '<%s %s>' % (self.__class__.__name__, id(self))
 
-def make_plugin(pam_conf, realm='basic'):
+def make_plugin(who_conf, realm='basic'):
     plugin = BasicAuthPlugin(realm)
     return plugin
 

Modified: repoze.who/trunk/repoze/who/plugins/cookie.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/plugins/cookie.py	(original)
+++ repoze.who/trunk/repoze/who/plugins/cookie.py	Wed Mar 19 14:10:23 2008
@@ -4,7 +4,7 @@
 
 from zope.interface import implements
 
-from repoze.pam.interfaces import IIdentifier
+from repoze.who.interfaces import IIdentifier
 
 class InsecureCookiePlugin(object):
 
@@ -54,7 +54,7 @@
     def __repr__(self):
         return '<%s %s>' % (self.__class__.__name__, id(self))
 
-def make_plugin(pam_conf, cookie_name='repoze.pam.plugins.cookie'):
+def make_plugin(who_conf, cookie_name='repoze.who.plugins.cookie'):
     plugin = InsecureCookiePlugin(cookie_name)
     return plugin
 

Modified: repoze.who/trunk/repoze/who/plugins/form.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/plugins/form.py	(original)
+++ repoze.who/trunk/repoze/who/plugins/form.py	Wed Mar 19 14:10:23 2008
@@ -6,8 +6,8 @@
 
 from zope.interface import implements
 
-from repoze.pam.interfaces import IChallenger
-from repoze.pam.interfaces import IIdentifier
+from repoze.who.interfaces import IChallenger
+from repoze.who.interfaces import IIdentifier
 
 _DEFAULT_FORM = """
 <html>
@@ -76,7 +76,7 @@
         return None
 
     def _get_rememberer(self, environ):
-        rememberer = environ['repoze.pam.plugins'][self.rememberer_name]
+        rememberer = environ['repoze.who.plugins'][self.rememberer_name]
         return rememberer
 
     # IIdentifier
@@ -107,7 +107,7 @@
     def __repr__(self):
         return '<%s %s>' % (self.__class__.__name__, id(self))
 
-def make_plugin(pam_conf, login_form_qs='__do_login', rememberer_name=None,
+def make_plugin(who_conf, login_form_qs='__do_login', rememberer_name=None,
                 form=None):
     if rememberer_name is None:
         raise ValueError(

Modified: repoze.who/trunk/repoze/who/plugins/htpasswd.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/plugins/htpasswd.py	(original)
+++ repoze.who/trunk/repoze/who/plugins/htpasswd.py	Wed Mar 19 14:10:23 2008
@@ -1,7 +1,7 @@
 from zope.interface import implements
 
-from repoze.pam.interfaces import IAuthenticator
-from repoze.pam.utils import resolveDotted
+from repoze.who.interfaces import IAuthenticator
+from repoze.who.utils import resolveDotted
 
 class HTPasswdPlugin(object):
 
@@ -47,7 +47,7 @@
     salt = hashed[:2]
     return hashed == crypt(password, salt)
 
-def make_plugin(pam_conf, filename=None, check_fn=None):
+def make_plugin(who_conf, filename=None, check_fn=None):
     if filename is None:
         raise ValueError('filename must be specified')
     if check_fn is None:

Modified: repoze.who/trunk/repoze/who/plugins/sql.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/plugins/sql.py	(original)
+++ repoze.who/trunk/repoze/who/plugins/sql.py	Wed Mar 19 14:10:23 2008
@@ -1,6 +1,6 @@
 from zope.interface import implements
 
-from repoze.pam.interfaces import IAuthenticator
+from repoze.who.interfaces import IAuthenticator
 
 def default_password_compare(cleartext_password, stored_password_hash):
     import sha
@@ -54,9 +54,9 @@
             if self.compare_fn(identity['password'], password):
                 return user_id
 
-def make_plugin(pam_conf, dsn=None, statement=None, compare_fn=None,
+def make_plugin(who_conf, dsn=None, statement=None, compare_fn=None,
                 conn_factory=None):
-    from repoze.pam.utils import resolveDotted
+    from repoze.who.utils import resolveDotted
     if dsn is None:
         raise ValueError('dsn must be specified')
     if statement is None:

Modified: repoze.who/trunk/repoze/who/tests.py
==============================================================================
--- /repoze.who/trunk/repoze/pam/tests.py	(original)
+++ repoze.who/trunk/repoze/who/tests.py	Wed Mar 19 14:10:23 2008
@@ -11,7 +11,7 @@
 
 class TestMiddleware(Base):
     def _getTargetClass(self):
-        from repoze.pam.middleware import PluggableAuthenticationMiddleware
+        from repoze.who.middleware import PluggableAuthenticationMiddleware
         return PluggableAuthenticationMiddleware
 
     def _makeOne(self,
@@ -120,7 +120,7 @@
         environ = self._makeEnviron()
         mw = self._makeOne()
         plugin1 = DummyIdentifier({'login':'fred','password':'fred'})
-        from repoze.pam.interfaces import IIdentifier
+        from repoze.who.interfaces import IIdentifier
         plugin1.classifications = {IIdentifier:['nomatch']}
         plugin2 = DummyIdentifier({'login':'bob','password':'bob'})
         plugins = [ ('identifier1', plugin1),  ('identifier2', plugin2) ]
@@ -134,7 +134,7 @@
 
     def test_identify_find_explicit_classifier(self):
         environ = self._makeEnviron()
-        from repoze.pam.interfaces import IIdentifier
+        from repoze.who.interfaces import IIdentifier
         plugin1 = DummyIdentifier({'login':'fred','password':'fred'})
         plugin1.classifications = {IIdentifier:['nomatch']}
         plugin2 = DummyIdentifier({'login':'bob','password':'bob'})
@@ -224,7 +224,7 @@
         environ = self._makeEnviron()
         mw = self._makeOne()
         plugin1 = DummyAuthenticator('chris_id1')
-        from repoze.pam.interfaces import IAuthenticator
+        from repoze.who.interfaces import IAuthenticator
         plugin1.classifications = {IAuthenticator:['nomatch']}
         plugin2 = DummyAuthenticator('chris_id2')
         plugins = [ ('auth1', plugin1), ('auth2', plugin2) ]
@@ -244,7 +244,7 @@
     def test_authenticate_find_explicit_classifier(self):
         environ = self._makeEnviron()
         mw = self._makeOne()
-        from repoze.pam.interfaces import IAuthenticator
+        from repoze.who.interfaces import IAuthenticator
         plugin1 = DummyAuthenticator('chris_id1')
         plugin1.classifications = {IAuthenticator:['nomatch']}
         plugin2 = DummyAuthenticator('chris_id2')
@@ -277,7 +277,7 @@
     def test_authenticate_success_multiresult_one_preauthenticated(self):
         environ = self._makeEnviron()
         mw = self._makeOne()
-        preauth = DummyIdentifier({'repoze.pam.userid':'preauthenticated'})
+        preauth = DummyIdentifier({'repoze.who.userid':'preauthenticated'})
         plugin1 = DummyAuthenticator('chris_id1')
         plugin2 = DummyAuthenticator('chris_id2')
         plugins = [ ('dummy1',plugin1), ('dummy2',plugin2) ]
@@ -292,7 +292,7 @@
         self.assertEqual(rank, (0,0,))
         self.assertEqual(authenticator, None)
         self.assertEqual(identifier, preauth)
-        self.assertEqual(creds['repoze.pam.userid'], 'preauthenticated')
+        self.assertEqual(creds['repoze.who.userid'], 'preauthenticated')
         self.assertEqual(userid, 'preauthenticated')
         result = results[1]
         rank, authenticator, identifier, creds, userid = result
@@ -371,7 +371,7 @@
         environ = self._makeEnviron()
         app1 = DummyApp()
         app2 = DummyApp()
-        from repoze.pam.interfaces import IChallenger
+        from repoze.who.interfaces import IChallenger
         challenger1 = DummyChallenger(app1)
         challenger1.classifications = {IChallenger:['nomatch']}
         challenger2 = DummyChallenger(app2)
@@ -390,7 +390,7 @@
         environ = self._makeEnviron()
         app1 = DummyApp()
         app2 = DummyApp()
-        from repoze.pam.interfaces import IChallenger
+        from repoze.who.interfaces import IChallenger
         challenger1 = DummyChallenger(app1)
         challenger1.classifications = {IChallenger:['nomatch']}
         challenger2 = DummyChallenger(app2)
@@ -420,7 +420,7 @@
         environ = self._makeEnviron()
         plugin1 = DummyMDProvider({'foo':'bar'})
         plugin2 = DummyMDProvider({'fuz':'baz'})
-        from repoze.pam.interfaces import IMetadataProvider
+        from repoze.who.interfaces import IMetadataProvider
         plugin2.classifications = {IMetadataProvider:['foo']}
         plugins = [ ('meta1', plugin1), ('meta2', plugin2) ]
         mw = self._makeOne(mdproviders=plugins)
@@ -525,7 +525,7 @@
         # @@ unfuck
 ##         self.assertEqual(identifier.forgotten, identifier.credentials)
         self.assertEqual(environ['REMOTE_USER'], 'chris')
-##         self.assertEqual(environ['repoze.pam.identity'], identifier.credentials)
+##         self.assertEqual(environ['repoze.who.identity'], identifier.credentials)
 
     def test_call_200_challenger_and_identifier_and_authenticator(self):
         environ = self._makeEnviron()
@@ -550,7 +550,7 @@
 ##         self.assertEqual(dict(identifier.remembered)['login'], dict(identifier.credentials)['login'])
 ##         self.assertEqual(dict(identifier.remembered)['password'], dict(identifier.credentials)['password'])
         self.assertEqual(environ['REMOTE_USER'], 'chris')
-##         self.assertEqual(environ['repoze.pam.identity'], identifier.credentials)
+##         self.assertEqual(environ['repoze.who.identity'], identifier.credentials)
 
 
     def test_call_200_identity_reset(self):
@@ -579,7 +579,7 @@
         # @@ unfuck
 ##         self.assertEqual(identifier.remembered, new_credentials)
         self.assertEqual(environ['REMOTE_USER'], 'chris')
-##         self.assertEqual(environ['repoze.pam.identity'], new_credentials)
+##         self.assertEqual(environ['repoze.who.identity'], new_credentials)
 
     def test_call_200_with_metadata(self):
         environ = self._makeEnviron()
@@ -601,21 +601,21 @@
                            mdproviders=mdproviders)
         start_response = DummyStartResponse()
         result = mw(environ, start_response)
-        self.assertEqual(environ['repoze.pam.identity']['repoze.pam.metadata'], {'foo':'bar'})
+        self.assertEqual(environ['repoze.who.identity']['repoze.who.metadata'], {'foo':'bar'})
 
     # XXX need more call tests:
     #  - auth_id sorting
 
 class TestMatchClassification(unittest.TestCase):
     def _getFUT(self):
-        from repoze.pam.middleware import match_classification
+        from repoze.who.middleware import match_classification
         return match_classification
 
     def test_match_classification(self):
         f = self._getFUT()
-        from repoze.pam.interfaces import IIdentifier
-        from repoze.pam.interfaces import IChallenger
-        from repoze.pam.interfaces import IAuthenticator
+        from repoze.who.interfaces import IIdentifier
+        from repoze.who.interfaces import IChallenger
+        from repoze.who.interfaces import IAuthenticator
         multi1 = DummyMultiPlugin()
         multi2 = DummyMultiPlugin()
         multi1.classifications = {IIdentifier:('foo', 'bar'),
@@ -634,7 +634,7 @@
 
 class TestStartResponseWrapper(unittest.TestCase):
     def _getTargetClass(self):
-        from repoze.pam.middleware import StartResponseWrapper
+        from repoze.who.middleware import StartResponseWrapper
         return StartResponseWrapper
 
     def _makeOne(self, *arg, **kw):
@@ -678,7 +678,7 @@
 
 class TestBasicAuthPlugin(Base):
     def _getTargetClass(self):
-        from repoze.pam.plugins.basicauth import BasicAuthPlugin
+        from repoze.who.plugins.basicauth import BasicAuthPlugin
         return BasicAuthPlugin
 
     def _makeOne(self, *arg, **kw):
@@ -687,8 +687,8 @@
 
     def test_implements(self):
         from zope.interface.verify import verifyClass
-        from repoze.pam.interfaces import IChallenger
-        from repoze.pam.interfaces import IIdentifier
+        from repoze.who.interfaces import IChallenger
+        from repoze.who.interfaces import IIdentifier
         klass = self._getTargetClass()
         verifyClass(IChallenger, klass)
         verifyClass(IIdentifier, klass)
@@ -769,13 +769,13 @@
 
 
     def test_factory(self):
-        from repoze.pam.plugins.basicauth import make_plugin
+        from repoze.who.plugins.basicauth import make_plugin
         plugin = make_plugin({}, 'realm')
         self.assertEqual(plugin.realm, 'realm')
 
 class TestHTPasswdPlugin(Base):
     def _getTargetClass(self):
-        from repoze.pam.plugins.htpasswd import HTPasswdPlugin
+        from repoze.who.plugins.htpasswd import HTPasswdPlugin
         return HTPasswdPlugin
 
     def _makeOne(self, *arg, **kw):
@@ -784,7 +784,7 @@
 
     def test_implements(self):
         from zope.interface.verify import verifyClass
-        from repoze.pam.interfaces import IAuthenticator
+        from repoze.who.interfaces import IAuthenticator
         klass = self._getTargetClass()
         verifyClass(IAuthenticator, klass)
 
@@ -852,22 +852,22 @@
         from crypt import crypt
         salt = '123'
         hashed = crypt('password', salt)
-        from repoze.pam.plugins.htpasswd import crypt_check
+        from repoze.who.plugins.htpasswd import crypt_check
         self.assertEqual(crypt_check('password', hashed), True)
         self.assertEqual(crypt_check('notpassword', hashed), False)
 
     def test_factory(self):
-        from repoze.pam.plugins.htpasswd import make_plugin
-        from repoze.pam.plugins.htpasswd import crypt_check
+        from repoze.who.plugins.htpasswd import make_plugin
+        from repoze.who.plugins.htpasswd import crypt_check
         plugin = make_plugin({}, 'foo',
-                             'repoze.pam.plugins.htpasswd:crypt_check')
+                             'repoze.who.plugins.htpasswd:crypt_check')
         self.assertEqual(plugin.filename, 'foo')
         self.assertEqual(plugin.check, crypt_check)
 
 
 class TestInsecureCookiePlugin(Base):
     def _getTargetClass(self):
-        from repoze.pam.plugins.cookie import InsecureCookiePlugin
+        from repoze.who.plugins.cookie import InsecureCookiePlugin
         return InsecureCookiePlugin
 
     def _makeOne(self, *arg, **kw):
@@ -876,7 +876,7 @@
 
     def test_implements(self):
         from zope.interface.verify import verifyClass
-        from repoze.pam.interfaces import IIdentifier
+        from repoze.who.interfaces import IIdentifier
         klass = self._getTargetClass()
         verifyClass(IIdentifier, klass)
 
@@ -919,7 +919,7 @@
         self.assertEqual(result, [('Set-Cookie', expected)])
 
     def test_factory(self):
-        from repoze.pam.plugins.cookie import make_plugin
+        from repoze.who.plugins.cookie import make_plugin
         plugin = make_plugin(None, 'foo')
         self.assertEqual(plugin.cookie_name, 'foo')
 
@@ -935,7 +935,7 @@
 
 class TestFormPlugin(Base):
     def _getTargetClass(self):
-        from repoze.pam.plugins.form import FormPlugin
+        from repoze.who.plugins.form import FormPlugin
         return FormPlugin
 
     def _makeOne(self, login_form_qs='__do_login', rememberer_name='cookie',
@@ -956,7 +956,7 @@
                  'CONTENT_TYPE':content_type,
                  'CONTENT_LENGTH':len(body),
                  'REQUEST_METHOD':'POST',
-                 'repoze.pam.plugins': {'cookie':DummyIdentifier()},
+                 'repoze.who.plugins': {'cookie':DummyIdentifier()},
                  'QUERY_STRING':'',
                  }
         if do_login:
@@ -966,8 +966,8 @@
     
     def test_implements(self):
         from zope.interface.verify import verifyClass
-        from repoze.pam.interfaces import IIdentifier
-        from repoze.pam.interfaces import IChallenger
+        from repoze.who.interfaces import IIdentifier
+        from repoze.who.interfaces import IChallenger
         klass = self._getTargetClass()
         verifyClass(IIdentifier, klass)
         verifyClass(IChallenger, klass)
@@ -1009,7 +1009,7 @@
         identity = {}
         result = plugin.remember(environ, identity)
         self.assertEqual(result, None)
-        self.assertEqual(environ['repoze.pam.plugins']['cookie'].remembered,
+        self.assertEqual(environ['repoze.who.plugins']['cookie'].remembered,
                          identity)
 
     def test_forget(self):
@@ -1018,12 +1018,12 @@
         identity = {}
         result = plugin.forget(environ, identity)
         self.assertEqual(result, None)
-        self.assertEqual(environ['repoze.pam.plugins']['cookie'].forgotten,
+        self.assertEqual(environ['repoze.who.plugins']['cookie'].forgotten,
                          identity
                          )
 
     def test_challenge_defaultform(self):
-        from repoze.pam.plugins.form import _DEFAULT_FORM
+        from repoze.who.plugins.form import _DEFAULT_FORM
         plugin = self._makeOne()
         environ = self._makeFormEnviron()
         app = plugin.challenge(environ, '401 Unauthorized', [], [])
@@ -1054,7 +1054,7 @@
         self.assertEqual(sr.status, '200 OK')
 
     def test_factory_withform(self):
-        from repoze.pam.plugins.form import make_plugin
+        from repoze.who.plugins.form import make_plugin
         here = os.path.dirname(__file__)
         fixtures = os.path.join(here, 'fixtures')
         form = os.path.join(fixtures, 'form.html')
@@ -1065,7 +1065,7 @@
         self.assertEqual(plugin.formbody, formbody)
 
     def test_factory_defaultform(self):
-        from repoze.pam.plugins.form import make_plugin
+        from repoze.who.plugins.form import make_plugin
         plugin = make_plugin(None, '__login', 'cookie')
         self.assertEqual(plugin.login_form_qs, '__login')
         self.assertEqual(plugin.rememberer_name, 'cookie')
@@ -1073,7 +1073,7 @@
 
 class TestAuthTktCookiePlugin(Base):
     def _getTargetClass(self):
-        from repoze.pam.plugins.auth_tkt import AuthTktCookiePlugin
+        from repoze.who.plugins.auth_tkt import AuthTktCookiePlugin
         return AuthTktCookiePlugin
 
     def _makeEnviron(self, *arg, **kw):
@@ -1102,7 +1102,7 @@
 
     def test_implements(self):
         from zope.interface.verify import verifyClass
-        from repoze.pam.interfaces import IIdentifier
+        from repoze.who.interfaces import IIdentifier
         klass = self._getTargetClass()
         verifyClass(IIdentifier, klass)
 
@@ -1119,7 +1119,7 @@
         result = plugin.identify(environ)
         self.assertEqual(len(result), 4)
         self.assertEqual(result['tokens'], [''])
-        self.assertEqual(result['repoze.pam.userid'], 'userid')
+        self.assertEqual(result['repoze.who.userid'], 'userid')
         self.assertEqual(result['userdata'], 'userdata')
         self.failUnless('timestamp' in result)
         self.assertEqual(environ['REMOTE_USER_TOKENS'], [''])
@@ -1133,7 +1133,7 @@
         result = plugin.identify(environ)
         self.assertEqual(len(result), 4)
         self.assertEqual(result['tokens'], [''])
-        self.assertEqual(result['repoze.pam.userid'], 'userid')
+        self.assertEqual(result['repoze.who.userid'], 'userid')
         self.assertEqual(result['userdata'], 'userdata')
         self.failUnless('timestamp' in result)
         self.assertEqual(environ['REMOTE_USER_TOKENS'], [''])
@@ -1150,7 +1150,7 @@
         plugin = self._makeOne('secret')
         val = self._makeTicket(userid='userid')
         environ = self._makeEnviron({'HTTP_COOKIE':'auth_tkt=%s' % val})
-        result = plugin.remember(environ, {'repoze.pam.userid':'userid',
+        result = plugin.remember(environ, {'repoze.who.userid':'userid',
                                            'userdata':'userdata'})
         self.assertEqual(result, None)
 
@@ -1159,7 +1159,7 @@
         old_val = self._makeTicket(userid='userid')
         environ = self._makeEnviron({'HTTP_COOKIE':'auth_tkt=%s' % old_val})
         new_val = self._makeTicket(userid='other', userdata='userdata')
-        result = plugin.remember(environ, {'repoze.pam.userid':'other',
+        result = plugin.remember(environ, {'repoze.who.userid':'other',
                                            'userdata':'userdata'})
         expected = 'auth_tkt=%s; Path=/;' % new_val
         self.assertEqual(result, [('Set-Cookie', expected)])
@@ -1183,7 +1183,7 @@
         self.assertEqual(value, 'auth_tkt=""; Path=/; Domain=.localhost')
 
     def test_factory(self):
-        from repoze.pam.plugins.auth_tkt import make_plugin
+        from repoze.who.plugins.auth_tkt import make_plugin
         plugin = make_plugin(None, 'secret')
         self.assertEqual(plugin.cookie_name, 'auth_tkt')
         self.assertEqual(plugin.secret, 'secret')
@@ -1192,7 +1192,7 @@
 
 class TestDefaultRequestClassifier(Base):
     def _getFUT(self):
-        from repoze.pam.classifiers import default_request_classifier
+        from repoze.who.classifiers import default_request_classifier
         return default_request_classifier
 
     def test_classify_dav_method(self):
@@ -1223,7 +1223,7 @@
 
 class TestMakeRegistries(unittest.TestCase):
     def _getFUT(self):
-        from repoze.pam.middleware import make_registries
+        from repoze.who.middleware import make_registries
         return make_registries
 
     def test_empty(self):
@@ -1248,9 +1248,9 @@
         dummy_mdprovider = DummyMDProvider()
         mdproviders = [ ('mdproviders', dummy_mdprovider) ]
         iface_reg, name_reg = fn(identifiers, authenticators, challengers, mdproviders)
-        from repoze.pam.interfaces import IIdentifier
-        from repoze.pam.interfaces import IAuthenticator
-        from repoze.pam.interfaces import IChallenger
+        from repoze.who.interfaces import IIdentifier
+        from repoze.who.interfaces import IAuthenticator
+        from repoze.who.interfaces import IChallenger
         self.assertEqual(iface_reg[IIdentifier], [dummy_id1, dummy_id2])
         self.assertEqual(iface_reg[IAuthenticator], [dummy_auth])
         self.assertEqual(iface_reg[IChallenger], [dummy_challenger])
@@ -1268,7 +1268,7 @@
         return environ
 
     def _getTargetClass(self):
-        from repoze.pam.plugins.sql import SQLAuthenticatorPlugin
+        from repoze.who.plugins.sql import SQLAuthenticatorPlugin
         return SQLAuthenticatorPlugin
 
     def _makeOne(self, dsn, statement, compare_fn, cfactory):
@@ -1284,7 +1284,7 @@
     
     def test_implements(self):
         from zope.interface.verify import verifyClass
-        from repoze.pam.interfaces import IAuthenticator
+        from repoze.who.interfaces import IAuthenticator
         klass = self._getTargetClass()
         verifyClass(IAuthenticator, klass)
 
@@ -1336,7 +1336,7 @@
 
 class TestDefaultPasswordCompare(unittest.TestCase):
     def _getFUT(self):
-        from repoze.pam.plugins.sql import default_password_compare
+        from repoze.who.plugins.sql import default_password_compare
         return default_password_compare
 
     def test_shaprefix_success(self):
@@ -1369,7 +1369,7 @@
 
 class TestMakeSQLAuthenticatorPlugin(unittest.TestCase):
     def _getFUT(self):
-        from repoze.pam.plugins.sql import make_plugin
+        from repoze.who.plugins.sql import make_plugin
         return make_plugin
 
     def test_nodsn(self):
@@ -1383,7 +1383,7 @@
     def test_comparefunc_specd(self):
         f = self._getFUT()
         plugin = f(None, 'dsn', 'statement',
-                   'repoze.pam.plugins.sql:make_plugin')
+                   'repoze.who.plugins.sql:make_plugin')
         self.assertEqual(plugin.dsn, 'dsn')
         self.assertEqual(plugin.statement, 'statement')
         self.assertEqual(plugin.compare_fn, f)
@@ -1391,7 +1391,7 @@
     def test_connfactory_specd(self):
         f = self._getFUT()
         plugin = f(None, 'dsn', 'statement', None,
-                   'repoze.pam.plugins.sql:make_plugin')
+                   'repoze.who.plugins.sql:make_plugin')
         self.assertEqual(plugin.dsn, 'dsn')
         self.assertEqual(plugin.statement, 'statement')
         self.assertEqual(plugin.conn_factory, f)
@@ -1401,14 +1401,14 @@
         plugin = f(None, 'dsn', 'statement')
         self.assertEqual(plugin.dsn, 'dsn')
         self.assertEqual(plugin.statement, 'statement')
-        from repoze.pam.plugins.sql import psycopg_connect
-        from repoze.pam.plugins.sql import default_password_compare
+        from repoze.who.plugins.sql import psycopg_connect
+        from repoze.who.plugins.sql import default_password_compare
         self.assertEqual(plugin.conn_factory, psycopg_connect)
         self.assertEqual(plugin.compare_fn, default_password_compare)
 
 class TestIdentityDict(unittest.TestCase):
     def _getTargetClass(self):
-        from repoze.pam.middleware import Identity
+        from repoze.who.middleware import Identity
         return Identity
 
     def _makeOne(self, **kw):
@@ -1417,12 +1417,12 @@
 
     def test_str(self):
         identity = self._makeOne(foo=1)
-        self.failUnless(str(identity).startswith('<repoze.pam identity'))
+        self.failUnless(str(identity).startswith('<repoze.who identity'))
         self.assertEqual(identity['foo'], 1)
 
     def test_repr(self):
         identity = self._makeOne(foo=1)
-        self.failUnless(str(identity).startswith('<repoze.pam identity'))
+        self.failUnless(str(identity).startswith('<repoze.who identity'))
         self.assertEqual(identity['foo'], 1)
 
 def compare_success(*arg):
@@ -1482,8 +1482,8 @@
 
     def __call__(self, environ, start_response):
         self.environ = environ
-        environ['repoze.pam.identity']['login'] = 'fred'
-        environ['repoze.pam.identity']['password'] = 'schooled'
+        environ['repoze.who.identity']['login'] = 'fred'
+        environ['repoze.who.identity']['password'] = 'schooled'
         start_response(self.status, self.headers)
         return ['body']
     

Modified: repoze.who/trunk/setup.py
==============================================================================
--- repoze.who/trunk/setup.py	(original)
+++ repoze.who/trunk/setup.py	Wed Mar 19 14:10:23 2008
@@ -24,10 +24,10 @@
 here = os.path.abspath(os.path.dirname(__file__))
 README = open(os.path.join(here, 'README.txt')).read()
 
-setup(name='repoze.pam',
+setup(name='repoze.who',
       version=__version__,
-      description=('repoze.pam (Pluggable Authentication Middleware) is an'
-                   'identification and authentication framework for WSGI.'),
+      description=('repoze.who is an identification and authentication '
+                   'framework for WSGI.'),
       long_description=README,
       classifiers=[
         "Development Status :: 1 - Planning",
@@ -50,10 +50,10 @@
       zip_safe=False,
       tests_require = ['Paste', 'zope.interface'],
       install_requires=['Paste', 'zope.interface'],
-      test_suite="repoze.pam.tests",
+      test_suite="repoze.who.tests",
       entry_points = """\
       [paste.filter_app_factory]
-      test = repoze.pam.middleware:make_test_middleware
+      test = repoze.who.middleware:make_test_middleware
       """
       )
 


More information about the Repoze-checkins mailing list