/[papo]/gnue/common/doc/technotes/00005.txt
ViewVC logotype

Diff of /gnue/common/doc/technotes/00005.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by styxman, Fri Nov 15 15:32:54 2002 UTC revision 1.3.2.1 by anthonyl, Tue Mar 4 22:09:31 2003 UTC
# Line 64  If all goes well, your login handler wil Line 64  If all goes well, your login handler wil
64    
65  Some notes:  Some notes:
66    
67    1) GNUe-Common will expect to see to two objects in your handler's    1) Almost the only restriction placed on getLogin's functionality is
      namespace:   LoginHandler   (from the import statement) and  
                   MyLoginHandler (your customized login class)  
   
      For this reason, do NOT change the import statement to read:  
        from gnue.common import GLoginHandler  
      and then change the class' parent to be GLoginHandler.LoginHandler.  
      If you do, your customized handler will probably not work the way  
      you expect.  
   
   2) Almost the only restriction placed on getLogin's functionality is  
68       that it must return a hash containing at least the values requested       that it must return a hash containing at least the values requested
69       when getLogin was called, using the value id's supplied. Your code,       when getLogin was called, using the value id's supplied. Your code,
70       in theory, can do whatever it needs in order to return these values.       in theory, can do whatever it needs in order to return these values.
# Line 164  class Authenticator: Line 154  class Authenticator:
154          'select 1 from users where username=%s and password=%s',          'select 1 from users where username=%s and password=%s',
155          (loginData['_username'],          (loginData['_username'],
156           loginData['_password']) )           loginData['_password']) )
157      if not results.fetchone():      if not cursor.fetchone():
158        raise LoginError        raise LoginError
159      else:      else:
160        loginData['_username'] = 'dbLogin'        loginData['_username'] = 'dbLogin'
161        loginData['_password'] = 'dbPassword'        loginData['_password'] = 'dbPassword'
162          
163        return loginData  
164  ===============================================================================  ===============================================================================
165    
166  Note: there are no hard and fast rules about what can go into the  Note: there are no hard and fast rules about what can go into the

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.3.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26