[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Security - IPrincipal.py:1.3 ILoginPassword.py:1.3 IAuthenticationService.py:1.5

Itamar Shtull-Trauring zope@itamarst.org
Thu, 5 Dec 2002 05:41:27 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv18284

Modified Files:
	IPrincipal.py ILoginPassword.py IAuthenticationService.py 
Log Message:
small docstring formatting cleanup and improvements


=== Zope3/lib/python/Zope/App/Security/IPrincipal.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/Security/IPrincipal.py:1.2	Mon Jun 10 19:28:16 2002
+++ Zope3/lib/python/Zope/App/Security/IPrincipal.py	Thu Dec  5 05:41:25 2002
@@ -18,6 +18,7 @@
 
 from Interface import Interface
 
+
 class IPrincipal(Interface):
     """Provide information about principals.
 
@@ -27,12 +28,11 @@
     provided for principals might extend IPrincipal and register a
     view for the extended interface that displays the extended
     information. We'll probably want to define a standard view
-    name (e.g.  "inline_summary") for this purpose.
+    name (e.g.  'inline_summary') for this purpose.
     """
 
     def getId():
-        """Return a unique id string for the principal.
-        """
+        """Return a unique id string for the principal."""
 
     def getTitle():
         """Return a label for the principal
@@ -41,5 +41,6 @@
         security assertions (e.g. role or permission
         assignments) about principals.
         """
+    
     def getDescription():
         """Return a description of the principal."""


=== Zope3/lib/python/Zope/App/Security/ILoginPassword.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/Security/ILoginPassword.py:1.2	Mon Jun 10 19:28:16 2002
+++ Zope3/lib/python/Zope/App/Security/ILoginPassword.py	Thu Dec  5 05:41:25 2002
@@ -13,15 +13,26 @@
 ##############################################################################
 from Interface import Interface
 
+
 class ILoginPassword(Interface):
+    """A password based login.
 
+    An IAuthenticationService would use this (adapting a request),
+    to discover the login/password passed from the user, or to
+    indicate that a login is required.
+    """
+    
     def getLogin():
         """Return login name, or None if no login name found."""
 
     def getPassword():
         """Return password, or None if no login name found.
-        If there's a login but no password, return empty string."""
+        
+        If there's a login but no password, return empty string.
+        """
 
     def needLogin(realm):
-        """Indicate that a login is needed.  The realm argument
-        is the name of the principal registry."""
+        """Indicate that a login is needed.
+
+        The realm argument is the name of the principal registry.
+        """


=== Zope3/lib/python/Zope/App/Security/IAuthenticationService.py 1.4 => 1.5 ===
--- Zope3/lib/python/Zope/App/Security/IAuthenticationService.py:1.4	Mon Jul 15 18:01:10 2002
+++ Zope3/lib/python/Zope/App/Security/IAuthenticationService.py	Thu Dec  5 05:41:25 2002
@@ -18,16 +18,17 @@
 
 from Interface import Interface
 
+
 class IAuthenticationService(Interface):
-    """
-    Provide support for establishing principals for requests and for
-    performing protocol-specific actions, such as issuing challenges
-    or providing login interfaces.
+    """Provide support for establishing principals for requests.
+
+    This is implemented by performing protocol-specific actions,
+    such as issuing challenges or providing login interfaces.
     
     IAuthenticationService objects are used to implement
     authentication services. Because they implement services, they are
     expected to collaborate with services in other contexts. Client
-    code doesn't sarch a context and call multiple services. Instead,
+    code doesn't search a context and call multiple services. Instead,
     client code will call the most specific service in a place and
     rely on the service to delegate to other services as necessary.
     
@@ -38,9 +39,7 @@
     """    
 
     def authenticate(request):
-        """
-        
-        Indentify a principal for a request
+        """Identify a principal for a request.
 
         If a principal can be identified, then return the
         principal id. Otherwise, return None.
@@ -77,8 +76,7 @@
         """
         
     def unauthorized(id, request):
-        """
-        Signal an authorization failure
+        """Signal an authorization failure.
         
         This method is called when an auhorization problem
         occurs. It can perform a variety of actions, such
@@ -96,11 +94,10 @@
         """
 
     def getPrincipal(id):
-        """
-        Get principal meta-data
+        """Get principal meta-data.
 
         Returns an object of type IPrincipal for the given principal
-        id. A NotFoundErrorx is raised if the principal cannot be
+        id. A NotFoundError is raised if the principal cannot be
         found.
 
         Note that the authentication service nearest to the requested
@@ -110,10 +107,8 @@
         """
 
     def getPrincipals(name):
-        """
-        Get principals with matching names.
+        """Get principals with matching names.
 
         Get a iterable object with the principals with names that are
         similar to (e.g. contain) the given name.
         """
-