Cambridge awarded Aubrey de Grey a PhD in biology based on his book on the mitochondrial theory of aging.
Both Cambridge and Oxford will consider works of their former undergraduates for PhD's, and arrange formal defences.
This seems like an entirely fair system. Some people end up doing real research without having participated in a PhD program, and it seems natural to then let them defend that as a thesis.