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

Class MyProxyLogonWSMiddleware

source code


Build on MyClientMiddleware to expose a special logon Web Service method

TODO: possible refactor to NOT inherit from MyProxyClientMiddleware but instead receive a MyProxyClient instance via environ set from an upstream MyProxyClientMiddleware object

Instance Methods [hide private]
 
__init__(self, app)
Create attributes
source code
 
parseConfig(self, prefix=PARAM_PREFIX, myProxyClientPrefix=None, **app_conf)
Parse dictionary of configuration items updating the relevant attributes of this instance
source code
 
logonFuncEnvironKeyName(self, value)
Set MyProxyClient environ key name
source code
 
__call__(self, environ, start_response)
Set MyProxy logon method in environ
source code
function
myProxyLogon(self)
Return the MyProxy logon method wrapped as a HTTP Basic Auth authenticate interface function
source code

Inherited from server.wsgi.middleware.MyProxyClientMiddlewareBase: app

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

Class Methods [hide private]

Inherited from server.wsgi.middleware.MyProxyClientMiddleware: filter_app_factory

Static Methods [hide private]

Inherited from server.wsgi.middleware.MyProxyClientMiddlewareBase: getStatusMessage

Class Variables [hide private]
string LOGON_FUNC_ENV_KEYNAME_OPTNAME = 'logonFuncEnvKeyName'
ini file option name to set the key name in WSGI environ dict to assign to the Logon function created by this middleware
string DEFAULT_LOGON_FUNC_ENV_KEYNAME = 'myproxy.server.wsgi.middlewa...
default value for the key name in WSGI environ dict to assign to the Logon function created by this middleware
string CERT_REQ_POST_PARAM_KEYNAME = 'certificate_request'
HTTP POST field name for the certificate request posted in logon calls
string PARAM_PREFIX = 'myproxy.ws.server.logon.'
prefix for ini file option names

Inherited from server.wsgi.middleware.MyProxyClientMiddleware: MYPROXY_CLIENT_PARAM_PREFIX, myProxyClient

Inherited from server.wsgi.middleware.MyProxyClientMiddlewareBase: CLIENT_ENV_KEYNAME_OPTNAME, DEFAULT_CLIENT_ENV_KEYNAME, clientEnvironKeyName

Instance Variables [hide private]
string __logonFuncEnvironKeyName
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__

parseConfig(self, prefix=PARAM_PREFIX, myProxyClientPrefix=None, **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 - ignored in this derived method
  • app_conf (dict) - PasteDeploy application specific configuration dictionary
Overrides: server.wsgi.middleware.MyProxyClientMiddleware.parseConfig

logonFuncEnvironKeyName(self, value)

source code 

Set MyProxyClient environ key name

Parameters:
  • value (basestring) - MyProxyClient logon function environ key name
Decorators:
  • @logonFuncEnvironKeyName.setter

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

source code 

Set MyProxy logon method in environ

Parameters:
  • environ (dict) - WSGI environment variables dictionary
  • start_response (function) - standard WSGI start response function
Overrides: server.wsgi.middleware.MyProxyClientMiddleware.__call__

myProxyLogon(self)

source code 

Return the MyProxy logon method wrapped as a HTTP Basic Auth authenticate interface function

Returns: function
MyProxy logon HTTP Basic Auth Callback
Decorators:
  • @property

Class Variable Details [hide private]

DEFAULT_LOGON_FUNC_ENV_KEYNAME

default value for the key name in WSGI environ dict to assign to the Logon function created by this middleware
Type:
string
Value:
'myproxy.server.wsgi.middleware.' 'MyProxyClientMiddleware.logon'