How should support for alternate credential types in twisted.pb be implemented?
My project has been trying to implement a credential checker using [scrypt](https://bitbucket.org/mhallin/py-scrypt/src). We've tried implementing our own credentials and checker objects, but we've had a lot of trouble getting pb to use them.

Pb seems hard-coded to use MD5 hashes over the wire, which absolutely won't work in our implementation; we don't have a way to get the correct password in plaintext on the server side, since we're using scrypt, so we need a way to transmit the password to be verified in plaintext instead. We've tried using twisted.cred.credentials.UsernamePassword with our credential checker, but it doesn't seem to make it to the server. (we still get _PortalAuthChallenger instead)

The ticket at http://twistedmatrix.com/trac/ticket/4398 seems to indicate that a PBServerFactory subclass is needed in order to support custom credential checkers in pb, but so far I have been completely unable to figure out what to override in order to make it use a different ICredentials implementation. Are there any examples (or even just documentation) of how to get pb to use a different credentials class?
How should support for alternate credential types in twisted.pb be implemented?
===

My project has been trying to implement a credential checker using [scrypt](https://bitbucket.org/mhallin/py-scrypt/src). We've tried implementing our own credentials and checker objects, but we've had a lot of trouble getting pb to use them.

Pb seems hard-coded to use MD5 hashes over the wire, which absolutely won't work in our implementation; we don't have a way to get the correct password in plaintext on the server side, since we're using scrypt, so we need a way to transmit the password to be verified in plaintext instead. We've tried using twisted.cred.credentials.UsernamePassword with our credential checker, but it doesn't seem to make it to the server. (we still get _PortalAuthChallenger instead)

The ticket at http://twistedmatrix.com/trac/ticket/4398 seems to indicate that a PBServerFactory subclass is needed in order to support custom credential checkers in pb, but so far I have been completely unable to figure out what to override in order to make it use a different ICredentials implementation. Are there any examples (or even just documentation) of how to get pb to use a different credentials class?