Ignore:
Timestamp:
13/10/09 16:30:41 (10 years ago)
Author:
pjkersha
Message:

Unit tested HTTPBasicAuthMiddleware. This will be used together MyProxyClientMiddleware? to make a myproxy-logon web service interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg_security_server/ndg/security/server/wsgi/myproxy.py

    r5830 r5838  
    1515 
    1616from myproxy.client import MyProxyClient 
     17from ndg.security.server.wsgi.authn import HTTPBasicAuthMiddleware 
    1718 
    1819class MyProxyClientMiddleware(object): 
     
    3536 
    3637        rePathMatchListParamName = prefix + \ 
    37                     MyProxyClientMiddleware.RE_PATH_MATCH_LIST_OPTNAME 
     38                            MyProxyClientMiddleware.RE_PATH_MATCH_LIST_OPTNAME 
    3839        rePathMatchListVal = app_conf.get(rePathMatchListParamName, '') 
    3940         
     
    108109        return False    
    109110         
     111         
     112class MyProxyLogonMiddleware(NDGSecurityMiddlewareBase): 
     113    """HTTP Basic Auth interface to MyProxy logon""" 
     114    PARAM_PREFIX = 'myproxy.logon.' 
     115     
     116    def __init__(self, app, app_conf, prefix=PARAM_PREFIX, **local_conf): 
     117        app = HTTPBasicAuthMiddleware(app, app_conf, **local_conf) 
     118        app = MyProxyClientMiddleware(app, app_conf, **local_conf) 
Note: See TracChangeset for help on using the changeset viewer.