Changeset 10474 for main/waeup.cas


Ignore:
Timestamp:
8 Aug 2013, 09:22:56 (11 years ago)
Author:
uli
Message:

Implement different backend config for kofa authenticator.

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

Legend:

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

    r10462 r10474  
    117117    name = 'kofa1'
    118118
    119     def __init__(self, auth_services=None):
    120         self.services = auth_services
     119    def __init__(self, auth_backends=None):
     120        self.backends = auth_backends
    121121
    122122    def check_credentials(self, username='', password=''):
  • main/waeup.cas/trunk/waeup/cas/tests/test_authenticators.py

    r10462 r10474  
    5959
    6060
    61 SERVICES = dict(
    62     inst1 = dict(auth_url = 'http://localhost:6666/app',
    63                  service_url = 'http://example.com/foo/bar')
     61BACKENDS = dict(
     62    inst1 = dict(
     63        url = 'http://localhost:6666/app',
     64        marker = '^M[0-9]+',
     65        )
    6466    )
    65 
    6667
    6768class KofaAuthenticatorTests(unittest.TestCase):
     
    7576        # all options have sensible defaults
    7677        auth = KofaAuthenticator()
    77         assert auth.services is None
     78        assert auth.backends is None
    7879
    7980    def test_options(self):
    8081        # we can pass options
    81         auth = KofaAuthenticator(auth_services=SERVICES)
    82         assert auth.services == SERVICES
     82        auth = KofaAuthenticator(auth_backends=BACKENDS)
     83        assert auth.backends == BACKENDS
    8384
    8485    def test_paste_deploy_options(self):
Note: See TracChangeset for help on using the changeset viewer.