[omniORB-dev] Python interceptors - no way to get peer identity - patch

Konstantin Olkhovskiy lupus at oxnull.net
Thu Jun 10 15:27:54 BST 2010


Hello,
finally i managed to code it down... It should not break any existing code.
One should pass optional second boolean argument to
addServerReceiveRequest or addClientReceiveReply, i.e.:

interceptors.addServerReceiveRequest(validateCredentials, True)
interceptors.addClientReceiveReply(validateCredentials, True)

Sample validateCredentials might look like this:

def validateCredentials(op, contexts, peer_info):
 address = peer_info['address']
 identity = peer_info['identity']
 print "%s@%s" % (address, identity)


Patch is attached. Hope i didn't forget anything.
--
Cheers,
Konstantin Olkhovskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyInterceptors.patch
Type: text/x-patch
Size: 6661 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-dev/attachments/20100610/b705c79b/pyInterceptors.bin


More information about the omniORB-dev mailing list