Changeset 4224

Show
Ignore:
Timestamp:
11/11/07 12:21:37 (1 year ago)
Author:
sylvain.hellegouarch
Message:

minor refactoring

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/nuxleus/Scripts/openid/server/server.py

    r4223 r4224  
    2727current_dir = os.getcwd() 
    2828 
    29 OID_COOKIE_SECRET_KEY = hmac.new(file('./cookie.key').read().strip()).hexdigest() 
    30  
    31 BASE_URL =  "http://openid.amp.fm" 
    32 BASE_SECURE_URL = "https://openid.amp.fm" 
    33 TRUST_URL =  "http://openid.amp.fm/trust" 
    34 OID_SERVICE_URL = "http://openid.amp.fm0/service" 
     29OID_COOKIE_SECRET_KEY = hmac.new(file('./cookie.key').readline().strip()).hexdigest() 
     30 
     31HOSTNAME = "amp.fm" 
     32 
     33BASE_URL =  "http://openid.%s" % HOST 
     34BASE_SECURE_URL = "https://openid.%s" % HOST 
     35TRUST_URL =  "http://openid.%s/trust" % HOST 
     36OID_SERVICE_URL = "http://openid.%s/service" % HOST 
    3537 
    3638# From CherryPy 
     
    477479                            'server.socket_host': '127.0.0.1', 
    478480                            'server.socket_queue_size': 25, 
    479                             #'server.ssl_certificate': './amp.fm.crt',  
    480                             #'server.ssl_private_key': './amp.fm.key', 
     481                            #'server.ssl_certificate': './server.crt',  
     482                            #'server.ssl_private_key': './server.key', 
    481483                            'log.screen': False, 
    482484                            'log.access_file': './access.log', 
     
    484486                            'checker.on': False, 
    485487                            'tools.proxy.on': True, 
    486                             'tools.proxy.base': 'http://openid.amp.fm'}) 
     488                            'tools.proxy.base': 'http://openid.%s' % HOST}) 
    487489 
    488490    from cherrypy import dispatch 
    489491    method_disp = dispatch.MethodDispatcher() 
    490     conf = {'/': { 'tools.gzip.on': True }, 
     492    conf = {'/': { 'tools.gzip.on': True , 
     493                   'tools.etags.on': True, 
     494                   'tools.etags.autotags': True }, 
    491495            '/login': { 'request.dispatch': method_disp }, 
    492496            '/logout': { 'request.dispatch': method_disp }, 
     
    497501    mc = Client(['127.0.0.1:11211']) 
    498502 
    499     s3conn = boto.connect_s3(file('./s3pub.key').read().strip(), 
    500                              file('./s3priv.key').read().strip()) 
     503    s3conn = boto.connect_s3(file('./s3pub.key').readline().strip(), 
     504                             file('./s3priv.key').readline().strip()) 
    501505 
    502506    store = FileOpenIDStore('/tmp/oid')