Changeset 10506 for main/waeup.cas/trunk/waeup/cas
- Timestamp:
- 17 Aug 2013, 11:55:00 (11 years ago)
- Location:
- main/waeup.cas/trunk/waeup/cas
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.cas/trunk/waeup/cas/authenticators.py
r10478 r10506 164 164 proxy = xmlrpclib.ServerProxy( 165 165 backend['url'], allow_none=True) 166 valid = proxy.check_credentials(username, password) 166 valid = proxy.check_applicant_credentials(username, password) 167 if valid is None: 168 valid = proxy.check_student_credentials(username, password) 167 169 if valid is not None: 168 170 return (True, '') -
main/waeup.cas/trunk/waeup/cas/tests/test_authenticators.py
r10478 r10506 134 134 kw.update(allow_none=True) 135 135 SimpleXMLRPCServer.__init__(self, *args, **kw) 136 self.register_function(self._check_credentials, 'check_credentials') 136 self.register_function( 137 self._check_credentials, 'check_applicant_credentials') 138 self.register_function( 139 self._check_credentials, 'check_student_credentials') 137 140 138 141 def _check_credentials(self, username, password): … … 173 176 # make sure the local fake kofa works 174 177 proxy = xmlrpclib.ServerProxy("http://localhost:6666", allow_none=True) 175 result = proxy.check_credentials('bird', 'bebop') 178 result = proxy.check_student_credentials('bird', 'bebop') 179 assert result == { 180 'description': 'Mr. Charles Parker', 181 'email': 'bird@gods.net', 182 'id': 'bird'} 183 result = proxy.check_applicant_credentials('bird', 'bebop') 176 184 assert result == { 177 185 'description': 'Mr. Charles Parker',
Note: See TracChangeset for help on using the changeset viewer.