source: TI12-security/trunk/python/Tests/openid-provider/op/op/config/routing.py @ 4081

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/Tests/openid-provider/op/op/config/routing.py@4081
Revision 4081, 813 bytes checked in by pjkersha, 11 years ago (diff)

First working version of an OpenID Provider as opposed to a Relying Party as avail. with AuthKit?. The code is taken from the HTTPServer example in the Python OpenID package and refactored into WSGI middleware.

  • ndg.security.server.wsgi.openid_provider - WSGI middleware package
  • Tests/openid-provider/op: pylons project test harness for the above

TODO: integrate into AuthKit? and Beaker Session Middleware as required.

Line 
1"""Routes configuration
2
3The more specific and detailed routes should be defined first so they
4may take precedent over the more generic routes. For more information
5refer to the routes manual at http://routes.groovie.org/docs/
6"""
7from pylons import config
8from routes import Mapper
9
10def make_map():
11    """Create, configure and return the routes Mapper"""
12    map = Mapper(directory=config['pylons.paths']['controllers'],
13                 always_scan=config['debug'])
14
15    # The ErrorController route (handles 404/500 error pages); it should
16    # likely stay at the top, ensuring it can always be resolved
17    map.connect('error/:action/:id', controller='error')
18
19    # CUSTOM ROUTES HERE
20
21    map.connect(':controller/:action/:id')
22    map.connect('*url', controller='template', action='view')
23
24    return map
Note: See TracBrowser for help on using the repository browser.