Package myproxy :: Package server :: Package wsgi :: Module middleware :: Class MyProxyClientMiddleware
[hide private]

Class MyProxyClientMiddleware

source code


Create a MyProxy client and make it available to other middleware in the WSGI stack

Instance Methods [hide private]
 
__init__(self, app)
Create attributes
source code
 
parseConfig(self, prefix=PARAM_PREFIX, myProxyClientPrefix=MYPROXY_CLIENT_PARAM_PREFIX, **app_conf)
Parse dictionary of configuration items updating the relevant attributes of this instance
source code
myproxy.client.MyProxyClient
_getMyProxyClient(self)
Get MyProxyClient instance
source code
 
_setMyProxyClient(self, value)
Set MyProxyClient instance
source code
 
__call__(self, environ, start_response)
Set MyProxyClient instance and MyProxy logon method in environ
source code

Inherited from MyProxyClientMiddlewareBase: app

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
myproxy.server.wsgi.middleware.MyProxyClientMiddleware
filter_app_factory(cls, app, global_conf, prefix=PARAM_PREFIX, myProxyClientPrefix=MYPROXY_CLIENT_PARAM_PREFIX, **app_conf)
Function following Paste filter app factory signature
source code
Static Methods [hide private]

Inherited from MyProxyClientMiddlewareBase: getStatusMessage

Class Variables [hide private]
string PARAM_PREFIX = 'myproxy.'
prefix for ini file option names
string MYPROXY_CLIENT_PARAM_PREFIX = 'client.'
default value for ini file sub-prefix used for MyProxyClient initialisation settings such as MyProxy server hostname, CA cert directory etc.
  myProxyClient = property(fget= _getMyProxyClient, fset= _setMy...

Inherited from MyProxyClientMiddlewareBase: CLIENT_ENV_KEYNAME_OPTNAME, DEFAULT_CLIENT_ENV_KEYNAME, clientEnvironKeyName

Instance Variables [hide private]
myproxy.client.MyProxyClient __myProxyClient
MyProxy client interface object to enable this middleware to communicate with a backend MyProxy server using the MyProxy protocol
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, app)
(Constructor)

source code 

Create attributes

Parameters:
  • app (function) - WSGI callable for next application in stack
Overrides: object.__init__

filter_app_factory(cls, app, global_conf, prefix=PARAM_PREFIX, myProxyClientPrefix=MYPROXY_CLIENT_PARAM_PREFIX, **app_conf)
Class Method

source code 

Function following Paste filter app factory signature

Parameters:
  • app (callable following WSGI interface) - next middleware/application in the chain
  • global_conf (dict) - PasteDeploy global configuration dictionary
  • prefix (basestring) - prefix for configuration items
  • myProxyClientPrefix (ini file sub-prefix used for MyProxyClient initialisation settings such as MyProxy server hostname, CA cert. directory etc.) - basestring
  • app_conf (dict) - PasteDeploy application specific configuration dictionary
Returns: myproxy.server.wsgi.middleware.MyProxyClientMiddleware
an instance of this application

parseConfig(self, prefix=PARAM_PREFIX, myProxyClientPrefix=MYPROXY_CLIENT_PARAM_PREFIX, **app_conf)

source code 

Parse dictionary of configuration items updating the relevant attributes of this instance

Parameters:
  • prefix (basestring) - prefix for configuration items
  • myProxyClientPrefix (basestring) - explicit prefix for MyProxyClient class specific configuration items
  • app_conf (dict) - PasteDeploy application specific configuration dictionary

_getMyProxyClient(self)

source code 

Get MyProxyClient instance

Returns: myproxy.client.MyProxyClient
MyProxyClient instance

_setMyProxyClient(self, value)

source code 

Set MyProxyClient instance

Parameters:
  • value (myproxy.client.MyProxyClient) - MyProxyClient instance

__call__(self, environ, start_response)
(Call operator)

source code 

Set MyProxyClient instance and MyProxy logon method in environ

Parameters:
  • environ (dict) - WSGI environment variables dictionary
  • start_response (function) - standard WSGI start response function

Class Variable Details [hide private]

MYPROXY_CLIENT_PARAM_PREFIX

default value for ini file sub-prefix used for MyProxyClient initialisation settings such as MyProxy server hostname, CA cert directory etc. The prefix is such that option names will look like this e.g. <PARAM_PREFIX><MYPROXY_CLIENT_PARAM_PREFIX>hostname ...
Type:
string
Value:
'client.'

myProxyClient

Value:
property(fget= _getMyProxyClient, fset= _setMyProxyClient, doc= "MyPro\
xyClient instance used to convert HTTPS" " call into a call to a MyPro\
xy server")