'Check if a given token has valid server credentials.'

def ValidateAuthTokenServer(self, token):

    if (not self.GetNonce(token.nonce)):
        return False
    if (token.username != self.server_username):
        return False
    generated_hash = self._GenerateAuthHash(token.nonce, self.server_username, self.server_password)
    return (token.hash == generated_hash)
