source: TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/controllers/wayf.py @ 4038

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/controllers/wayf.py@4038
Revision 4038, 1.0 KB checked in by pjkersha, 12 years ago (diff)

Completed ElementTree - ZSI integration for WS-Security SignatureHandler? but still problems with ET C14N for signature generation: C14N produces superfluous xmlns declarations.

Line 
1import logging
2
3from ndg.security.server.sso.sso.lib.base import *
4from ndg.security.common.AttAuthority import AttAuthorityClient
5from base64 import urlsafe_b64decode
6
7log = logging.getLogger(__name__)
8
9
10class WayfController(BaseController):
11    """Where Are You From Controller - display a list of trusted sites for
12    login"""
13
14    def index(self):
15        ''' NDG equivalent to Shibboleth WAYF '''
16        log.debug("WayfController.index ...")
17
18        # Check for return to arg in query.  This is necessary only if the
19        # WAYF query originates from a different service to this one
20        if 'r' in request.params:
21            # Convenience alias
22            state = g.ndg.security.common.sso.state
23       
24            state.b64encReturnToURL = str(request.params['r'])
25            state.returnToURL = urlsafe_b64decode(str(state.b64encReturnToURL)) 
26            log.debug("Set return to URL from 'r' query arg: r = %s"% \
27                                                        state.returnToURL)
28
29        # Trigger AuthKit handler:
30        abort(401)
Note: See TracBrowser for help on using the repository browser.