What are the best methods to create private RSS feeds? I have som开发者_如何学Pythone public feed items and some private feed items. When user clicks on private feed item link, he needs to be authenticated before viewing the post.
Thank you.
- You can use HTTP authentication (401 +
WWW-Authenticate
header) - You can create unique, unguessable feed URLs. This is easiest for users, as it "just works" with any feed reader without extra step.
Ideally you should allow user to invalidate all those URLs from your website (in case private feed URL "leaks")
E.g.: store random string (uuid/hash of random data) in your users table, when serving feed look up user using this string. When user wants to invalidate feed URLs, generate new random string.
精彩评论