/[gnue]/gnue-appserver/src/geasSessionManager.py
ViewVC logotype

Diff of /gnue-appserver/src/geasSessionManager.py

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

revision 1.12 by siesel, Fri Aug 15 21:29:51 2003 UTC revision 1.13 by siesel, Sat Aug 16 17:07:16 2003 UTC
# Line 23  Line 23 
23    
24  import geasSession  import geasSession
25  import geasAuthentication  import geasAuthentication
26    import geasTrigger
27  import classrep  import classrep
28    
29  # =============================================================================  # =============================================================================
# Line 46  class geasSessionManager: Line 47  class geasSessionManager:
47      self._connections = connections      self._connections = connections
48      self._sessNo = 0      self._sessNo = 0
49      self._sessions = {}      self._sessions = {}
50      # initialize Class Repository without Authentication      self._buildInternalSess()
51      self._authAdapter = geasAuthentication.geasAuthAgent ()      self._classRep = classrep.init (self)
52      classrep.init (self)  
53      # use DB for authetification      # TODO: load default authagent depending on config setting
54      # self._authAdapter = geasAuthentification.geasDBAuthAgent()      self._authAdapter = geasAuthentication.geasDBAuthAgent(self._internalSession)
55      # Commented out as long as authentication classes are not fully defined        
56        self._triggerMg = geasTrigger.geasPythonDBTriggerMg(self)
57    
58    
59      # ---------------------------------------------------------------------------
60      # Build an internal session
61      # ---------------------------------------------------------------------------
62    
63      def _buildInternalSess(self):
64        self._internalSession = geasSession.geasSession (self._connections,
65                                                         geasAuthentication.geasAuthAgent(),
66                                                         None)
67        self._internalSession.login(None,None) # fake login
68        self._sessions[self._internalSession]=self._internalSession
69    
70    # ---------------------------------------------------------------------------    # ---------------------------------------------------------------------------
71    # Find a session from session ID    # Find a session from session ID
# Line 68  class geasSessionManager: Line 82  class geasSessionManager:
82    # ---------------------------------------------------------------------------    # ---------------------------------------------------------------------------
83    
84    def open (self, authentication):    def open (self, authentication):
85      sess = geasSession.geasSession (self._connections)      sess = geasSession.geasSession (self._connections,
86      sess._authAdapter = self._authAdapter                                            self._authAdapter,
87                                        self._triggerMg)
88    
89      if not sess.login (authentication ['user'],      if not sess.login (authentication ['user'],
90                         authentication ['password']):                         authentication ['password']):
91        raise AuthError        raise AuthError

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

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