Nice module - it works great. But it would be nice if the token were automatically appended to the url in the feed icons themselves, without having to go to the 'my account' page. Many user's aren't going to realize that, and the default RSS link is just as useless as it ever was before having this module.

CommentFileSizeAuthor
#4 501634.autoappend.patch614 bytesGrayside
#2 501634.autoappend.patch603 bytesGrayside

Comments

agerson’s picture

Priority: Normal » Critical

This is an important feature request.

Grayside’s picture

Assigned: Unassigned » Grayside
Status: Active » Needs review
StatusFileSize
new603 bytes

The attached patch depends on http://drupal.org/project/url_alter.

It checks every path that passes through url() against tokenauth's allowed pages filter, and if it is approved, the token is added to the URL.

awry’s picture

Patch in #2 works for rss feeds on my site, but not ical feeds. Tokenauth is working for */ical on my site, but the token isn't appended to */ical URLs when using the patch above. How can I check what is in tokenauth_allowed_pages?

Grayside’s picture

StatusFileSize
new614 bytes

Using drush, drush vget tokenauth_allowed_pages. Otherwise, it should appear on the admin/settings/tokenauth page, in the text area under "Activate tokens on specific pages".

Attached patch prevents "token=" from showing up in the query string if the token is not already set in the URL. (It does not address #3.)

Grayside’s picture

Status: Needs review » Fixed

Fixed.

Took last patch with a few more changes to check that token is correctly set for the current user and that any existing query string is not clobbered by the addition of the token. This latter problem might explain any links broken while testing previous versions of the patch.

This patch continues to be dependent on the URL Alter module. If that module is not installed, there is no difference in Tokenauth functionality.

awry’s picture

I tried updating to latest dev, but now none of my paths are getting tokens auto-appended.

Also, when I run 'drush vget tokenauth_allowed_pages' I get no output.

Yet, on admin/settings/tokenauth, under "Activate tokens on specific pages" I have:

rss.xml
*/feed
*/opml
*/ical

When you say 'fixed' does that mean it is supposed to be fixed in the -dev version, or that the patch in #4 fixes?

Thanks for your help!

awry’s picture

Nevermind, I'm completely off my rocker today. Of course it's not in -dev, as the original feature was a patch. Sorry.

awry’s picture

Reverted to stable tokenauth module.

Grayside, did you forget to attach an updated patch to #5?

The patch in #4 actually breaks the token auto-append on rss for me, and doesn't fix ical either.

As I stated in #6, there is no variable tokenauth_allowed_pages in drush for me, but there is one called tokenauth_pages, which appears to match what I have at admin/settings/tokenauth.

Grayside’s picture

- A modified version of the above patch is currently in -dev, and works for me.

- Nice catch on the variable name. Sorry about that.

- There is nothing obvious about why ical feeds should not work with this module. This module simply handles a special approach to logging in a user, it doesn't really care about what the page is. That said, I've seen logout troubles with Pressflow. Do you have a modified Drupal Core?

- As far as the auto-append, you do need url_alter enabled.

Could you tell me more about your Drupal install? What are you using to generate the ical feed?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pheraph’s picture

Status: Closed (fixed) » Needs work

I tried the latest dev-version, but it didn't append the token to the rss-links. I reverted the following line from

if ($_REQUEST['token'] && tokenauth_allowed_pages($original_path))

to

if (tokenauth_allowed_pages($original_path))

and now it works as wished. What does the $_REQUEST['token'] condition do?

Raphael

Grayside’s picture

The version of the code in the patch above is not the same as in -dev now. Based on your post, it appears you are trying to use the patch.

Grayside’s picture

Status: Needs work » Closed (cannot reproduce)
frederickjh’s picture

Issue summary: View changes

Hi @Grayside!

I hate to comment on such an old closed issue but I am struggling to get this working.

I am using version 6.x-1.2 of url_alter. I have tried to get this to work with the following versions of tokenauth: 6.x-1.7, 6.x-1.x-dev and 6.x-2.x-dev in that order. I even tried to totally uninstall the last version and then reinstalled but it does not work. Tokens are never added to the end of the url that are entered in the Token Authorization configuration. Token authorization does work.

Also of note is that drush vget tokenauth_allowed_pages always returns No matching variable found. [error] no matter which version is installed. I think that this is some how an indication of what is wrong.

Any help you could give me to get this to work would be appreciated!

God Bless!

Frederick