'Returns a twitter.User instance if the authenticating user is valid.
Returns:
A twitter.User instance representing that user if the
credentials are valid, None otherwise.'

def VerifyCredentials(self):

    if (not self._oauth_consumer):
        raise TwitterError('Api    instance    must    first    be    given    user    credentials.')
    url = ('%s/account/verify_credentials.json' % self.base_url)
    try:
        json = self._FetchUrl(url, no_cache=True)
    except urllib2.HTTPError as http_error:
        if (http_error.code == httplib.UNAUTHORIZED):
            return None
        else:
            raise http_error
    data = self._ParseAndCheckTwitter(json)
    return User.NewFromJsonDict(data)
