source: TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/openidrelyingparty_withapp/securityservicesapp.py @ 5541

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/openidrelyingparty_withapp/securityservicesapp.py@5541
Revision 5541, 971 bytes checked in by pjkersha, 11 years ago (diff)

New integration test for trying out OpenID Relying Party running in the application code stack instead of the separate services stack.

Line 
1#!/usr/bin/env python
2"""NDG Security test harness for security web services middleware stack
3
4NERC DataGrid Project
5
6"""
7__author__ = "P J Kershaw"
8__date__ = "20/11/08"
9__copyright__ = "(C) 2009 Science and Technology Facilities Council"
10__contact__ = "Philip.Kershaw@stfc.ac.uk"
11__revision__ = "$Id$"
12import os
13from os.path import dirname, abspath, join
14
15   
16# To start run
17# $ paster serve services.ini or run this file as a script
18# $ ./securityservicesapp.py [port #]
19if __name__ == '__main__':
20    import sys
21    import logging
22    logging.basicConfig(level=logging.DEBUG)
23
24    if len(sys.argv) > 1:
25        port = int(sys.argv[1])
26    else:
27        port = 7443
28       
29    cfgFilePath = os.path.join(dirname(abspath(__file__)), 
30                               'securityservices.ini')
31       
32    from paste.httpserver import serve
33    from paste.deploy import loadapp
34   
35    app = loadapp('config:%s' % cfgFilePath)
36    serve(app, host='0.0.0.0', port=port)
Note: See TracBrowser for help on using the repository browser.