'Attempt to enter the authenticated state with the server
This command is allowed in the Non-Authenticated state.
@rtype: C{Deferred}
@return: A deferred whose callback is invoked if the authentication
succeeds and whose errback will be invoked otherwise.'

def authenticate(self, secret):

    if (self._capCache is None):
        d = self.getCapabilities()
    else:
        d = defer.succeed(self._capCache)
    d.addCallback(self.__cbAuthenticate, secret)
    return d
