Project:Token authentication
Version:6.x-1.1
Component:User interface
Category:feature request
Priority:critical
Assigned:Grayside
Status:closed (cannot reproduce)

Issue Summary

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.

Comments

#1

Priority:normal» critical

This is an important feature request.

#2

Assigned to:Anonymous» Grayside
Status:active» needs review

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.

AttachmentSize
501634.autoappend.patch 603 bytes

#3

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?

#4

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.)

AttachmentSize
501634.autoappend.patch 614 bytes

#5

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.

#6

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!

#7

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

#8

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.

#9

- 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?

#10

Status:fixed» closed (fixed)

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

#11

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

#12

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.

#13

Status:needs work» closed (cannot reproduce)
nobody click here