Sample entitlement banner code is now available under "Dynamic banners"
in this article:Creating banners and dynamic banners for browse pages If
you're not signed in, you get a "Click here to sign in" prompt. If
you're signed in, you get a Sign Out button that displays the banner
short title (or "Hello"). You can edit the index.html file to provide
your own strings and formatting. (Remember to select the "Enable
extensibility features" option when creating the dynamic banner.)