This article is a stub. You can help the IndieWebCamp wiki by expanding it.
authorship is a claim about who the author(s) of a post are.
How to determine authorship of a post on a page - AKA the Authorship Algorithm / processing model for implementations.
Note: the steps of checking for "url == uid == page's URL" and "url that's also a rel-me" were incorporated inline from the steps for parsing a representative h-card. Some improvements have been made here due to feedback from implementations in practice, and those improvements should be incorporated into an iteration of representative h-card.
Authorship can potentially be spoofed, as the current algorithm may only look at the markup within an arbitrary page to determine the author.
For example, any page with markup like http://paste.debian.net/plainh/587c8bb3
would be parsed as being written by Barnaby Walters. Examples of such spoofing are present at
was not actually written by aaronpk, but posted on a debian pastebin site and linked via a webmention.
is similarly spoofed.
Theoretical issues are grouped here for capturing purposes. If you find a real world example of one of these, feel free to promote it to an actual issue with its own === subhead.
Name avatar display in comments
In comments-presentation, it describes how a site that accepts indieweb reply posts via webmention can retrieve those replies and display them as full-fledged comments on a post, including name and icon/avatar of commenter.
Algorithm Design Notes
Why do we parse for the authorship details in the order that we do?
First, we prefer the p-author of the h-entry first because that is the most direct way of specifying the information, visibly, on the page. There's also established practice among indieweb sites of publishing a mini h-card with photo, name (sometimes as the alt text of the photo img), and URL to the person's indieweb site root / home page. Also, it may be possible that the post is a guest post, in which case we really want the post-specific authorship information rather than anything general to the site.
Only if the post itself lacks direct authorship information do we fall back to checking for a rel-author link, which is a fairly well established practice for linking from posts to pages representing authors.
On such sites that use rel-author, they almost always point to a page that has a much richer hCard about the author than the post page itself, including a much higher likelihood of having a good photo / avatar image as part of that hCard. Thus we next prefer to go retrieve that rel-author destination, and look for a representative hCard there (per the "url == uid == page's URL" and "url that's also a rel-me" steps noted above).
Only if the rel-author page lacks an hCard do we then fallback to looking for a likely smaller (if present) hCard on the post page itself that has a u-url of the same value as the destination of the rel-author, thus indicating that it is an hCard for the author.
php mf2 getAuthor
barnabywalters/mf-cleaner getAuthor() implements several extra steps whilst missing out the steps above which require fetching another URL — at the moment getAuthor completely lacks side effects: