Re: Python interceptors - no way to get peer identity - patch
Konstantin Olkhovskiy <[email protected]> Fri, 9 Jul 2010 11:47:11 +0400
| Newsgroups | gmane.comp.corba.omniorb.devel |
|---|---|
| Message-ID | <[email protected]> |
Does this patch have any chance to be integrated? We can't start our project without being sure that we do not need patching future releases... 2010/6/10 Konstantin Olkhovskiy <[email protected]>: > Hello, > finally i managed to code it down... It should not break any existing cod= e. > 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): > =A0address =3D peer_info['address'] > =A0identity =3D peer_info['identity'] > =A0print "%s@%s" % (address, identity) > > > Patch is attached. Hope i didn't forget anything. > -- > Cheers, > Konstantin Olkhovskiy > -- Cheers, Konstantin Olkhovskiy