Tokenauth is a great module, (http://drupal.org/node/150180) thanks to moshe for publishing.
It allow to access content (like rss feed) respecting permissions. I integrate it to my differents feeds but had to modify some files to make it work correctly.

I don't know the status of the module, but some features are missing:

a) a simple function to get the current token
---------------------------------------------------------
function getToken(){
global $user;
if (!$user->uid) return "";
$token = db_result(db_query("SELECT tt.token FROM {tokenauth_tokens} tt WHERE tt.uid = %d", $user->uid));
if ($token)
return "token=$token";
}
b) a simple function to rewrite the url relativelely to the $_REQUEST['token']
---------------------------------------------------------
function getTokenLink($link){
$token=(isset($_REQUEST['token'])?"?token=".$_REQUEST['token']:"");
if (preg_match("/#/",$link))
$link=preg_replace("/#/",$token."#",$link);
else
$link.=$token;
return $link;
}

c) The feed authorisation work to get the list but not to view it so hacking common.inc
---------------------------------------------------------
function format_rss_channel($title, $link, $description, $items, $language = 'en', $args = array()) {
// arbitrary elements may be added using the $args associative array

$output = "\n";
$output .= ' '. check_plain($title)." \n";
$output .= '
'. getTokenLink(check_url($link))."\n";

and

function format_rss_item($title, $link, $description, $args = array()) {
$output = "\n";
$output .= ' '. check_plain($title) ."\n";
$output .= '
'. getTokenLink(check_url($link))."\n";

Hope it could help somebody ... or could be cleanly integrate to drupal ... I dont know if it is possible to override format_rss_item without modifiing common.inc ...
Marc

Comments

bonobo’s picture

http://drupal.org/node/add/project_issue/tokenauth/feature

Often, an isolated post in the forum gets missed or overlooked -- put this as a feature request and it will receive better review and feedback --

Cheers,

Bill

-------
http://www.funnymonkey.com
Tools for Teachers

sethcohn’s picture

Found this page, and since it wasn't an issue yet, added it:

http://drupal.org/node/209883