Changeset 10506


Ignore:
Timestamp:
17 Aug 2013, 11:55:00 (11 years ago)
Author:
uli
Message:

Also ask for applicant credentials when querying Kofa servers.

Location:
main/waeup.cas/trunk/waeup/cas
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.cas/trunk/waeup/cas/authenticators.py

    r10478 r10506  
    164164            proxy = xmlrpclib.ServerProxy(
    165165                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)
    167169            if valid is not None:
    168170                return (True, '')
  • main/waeup.cas/trunk/waeup/cas/tests/test_authenticators.py

    r10478 r10506  
    134134        kw.update(allow_none=True)
    135135        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')
    137140
    138141    def _check_credentials(self, username, password):
     
    173176        # make sure the local fake kofa works
    174177        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')
    176184        assert result == {
    177185            'description': 'Mr. Charles Parker',
Note: See TracChangeset for help on using the changeset viewer.