Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_webservices.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_webservices.py	(revision 10503)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_webservices.py	(revision 10503)
@@ -0,0 +1,40 @@
+# Tests for applicant webservices
+from zope.app.testing.xmlrpc import ServerProxy
+from waeup.kofa.testing import FunctionalLayer
+from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
+
+
+class XMLRPCTests(ApplicantsFullSetup):
+    # check XMLRPC services for university portal
+
+    layer = FunctionalLayer
+
+    def setup_applicant(self, applicant):
+        applicant.firstname = u'Bob'
+        applicant.lastname = u'Bubble'
+        applicant.email = 'bob@sample.com'
+        pass
+
+    def test_check_applicant_credentials_valid(self):
+        # make sure we can get applicant infos providing valid creds
+        server = ServerProxy('http://mgr:mgrpw@localhost/app')
+        self.setup_applicant(self.applicant)
+        apl_id = self.applicant.applicant_id
+        result = server.check_applicant_credentials(apl_id, 'apwd')
+        self.assertEqual(
+            result, {
+                'description': 'Bob Bubble',
+                'email': 'bob@sample.com',
+                'id': apl_id,
+                'type': 'applicant'}
+            )
+        return
+
+    def test_check_applicant_credentials_invalid(self):
+        # invalid creds will give no results
+        server = ServerProxy('http://mgr:mgrpw@localhost/app')
+        self.setup_applicant(self.applicant)
+        apl_id = self.applicant.applicant_id
+        result = server.check_applicant_credentials(apl_id, 'wrong-pw')
+        self.assertEqual(result, None)
+        return
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/webservices.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/webservices.py	(revision 10503)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/webservices.py	(revision 10503)
@@ -0,0 +1,53 @@
+## $Id$
+##
+## Copyright (C) 2013 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+import grok
+from zope.component import getUtility
+from zope.pluggableauth.interfaces import IAuthenticatorPlugin
+from waeup.kofa.interfaces import IUniversity
+
+
+class StudentsXMLRPC(grok.XMLRPC):
+    """Student related XMLRPC webservices.
+
+    Please note, that XMLRPC does not support real keyword arguments
+    but positional arguments only.
+    """
+    grok.context(IUniversity)
+
+    @grok.require('waeup.xmlrpc')
+    def check_applicant_credentials(self, username, password):
+        """Returns applicant data if username and password are valid,
+        None else.
+
+        We only query the applicants authenticator plugin in order not
+        to mix up with other credentials (admins, staff, etc.).
+
+        All additional checks performed by usual applicant
+        authentication apply.
+
+        This method can be used by CAS to authentify applicants for
+        external systems like moodle.
+        """
+        auth = getUtility(IAuthenticatorPlugin, name='applicants')
+        creds = dict(login=username, password=password)
+        principal = auth.authenticateCredentials(creds)
+        if principal is None:
+            return None
+        return dict(email=principal.email, id=principal.id,
+                    type=principal.user_type,
+                    description=principal.description)
