Thanks for the quick fix of http://drupal.org/node/900802
Now I see this in the Token authentication tab:
>>
n/a
Your token: ?token=pzG...
<<
Am I not supposed to see some example RSS URLs?
Furthermore, when I use RSS URL from front page feed, .../rss.xml, I get all the public content on the frontpage. That is fine.
It was my impression that if I use RSS URL .../rss.xml?token=pzG... I would also get the protected content from the front page. That does not happen.
Any help is appreciated.
Thanks
Thomas S
Comments
Comment #1
Grayside commentedURL Examples
The text in that tab was changed. It no longer displays example URLs. This is because the paths at which Tokenauth operates are fully configurable, and I decided I wanted text that would be valid even if an admin changed the paths right away. That text is configurable, and the tokenauth-token is available so you can build relevant example URL's with the user's token.
What Tokenauth Does
All tokenauth does is set things up so Drupal displays content as though the user assigned that token were actually logged in. It does not magically promote content to the front page/main site RSS feed if it is not already there.
I am marking as Postponed to explore the second issue. The first point about example URL's is Won't Fix by Design.
Comment #2
tps commentedHi Grayside,
I was not very precise!
I have three Stories (core content type Story) on my front page and I have three 'Protected Stories' on my front page. I created the content type 'Protected Story' and the idea is that only authenticated users should be able to see that content type. It works fine in Drupal. An anonymous user sees only three entries (all Content type Story) on the front page. A logged on user sees six entries on the front page – three entries of content type Story and three entries of content type ‘Protected Story’.
Now, it is my hope that by using the Token Authentication module a user with a valid token will get all six entries in his or her Drupal RSS front page feed.
Did I get the concept wrong?
If this is the concept then how does the user add the token to the front page RSS feed URL to get the protected content?
Thanks a lot for your patience.
Thomas S
Comment #3
Grayside commentedTokenauth does indeed work that way.
The tricky part of Tokenauth is getting the token into the user's hands in an effective way. That's why I made the text in the user's Token Authentication tab configurable. You can use HTML in configuring that text, including creating an HTML URL to whichever paths you want.
You would then get that token into the user's hands by directing them to that page.
Now, if you want to get crazier... you could implement hook_url_alter_inbound() [using the URL alter module) or the like, and stick the user's token in the URL for easier bookmarking.
Comment #4
tps commentedHi Grayside
I got it working - at least some of the way!
Here is what I do using Firefox as browser:
1. In the first tab of Firefox the user logs in and retrieves his token and then logs out.
2. User opens a new tab in Firefox.
3. User enters the front page URL in the address field - ../rss.xml and hits enter
4. He sees only the three not protected stories - that is fine
5. He adds the token to the URL in the address field - ../rss.xml?token=pzGo... and hits enter
6. The user still sees only the three not protected stories - I thought he would also see the protected stories!
7. The users goes to the first tab en Firefox and logs in.
8. The user refreshed the Firefox tab with the URL ../rss.xml?token=pzGo... and now he sees also the protected content.
Does the user have to be logged into his Drupal site when using the RSS feed URL with the token?
If that is the case then I am a little confused. I thought the idea was that the user was able to retrieve even the protected content no matter weather his is logged into the Drupal site or not as long as he provides a valid token?
If testing the RSS feed from the address field in Firefox is not valid and I should use a 'real' RSS reader then could you please point me to an appropriate RSS reader.
Thanks
Thomas S
Comment #5
Grayside commentedThat is a completely different sort of issue. I will investigate this tomorrow.
The point of this is that, as far as Drupal is concerned, the page renders exactly as if you were logged in with only the URL token in place.
Could you tell me if you are using Pressflow? Also, what are you using to restrict the nodes in question from anonymous viewing?
Comment #6
tps commentedHi Grayside,
I don't use Pressflow.
I use Content Access 6.x-1.2 to restrict anonymous access to the content type "Protected Story" that I created. In the Access control tab for this content type I have three check marks. Check marks are in "View any content: , authenticated user", "View own content: anonymous user and authenticated user"
Thanks
Thomas S
Comment #7
Grayside commentedI can confirm that you are not crazy. Tokenauth does not seem to be working with Content Access.
Comment #8
Grayside commentedReverting back, I tried it on a non-pressflow system and it was working properly. Looks like I need to revisit pressflow and make sure that issue was properly resolved.
I will investigate that, wipe my testing instance, and try again. But this is starting to look like a Cannot Reproduce. Have you set the module weight of content access to less than -1000?
Comment #9
tps commentedHi Grayside
I have done nothing to set the module weight of Content Access. I don't even know what module weight is!!
If you want an account on the test site where I have the unexpected behavior we can exchange uid/pwd ?
Thanks for all your attention.
Thomas S
Comment #10
tps commentedHi Grayside
So you say that Tokenauth works with Content Access - correct ?
I still can't make it work.
I do not use Pressflow.
By the way - is it your impression that authenticated RSS feeds are widely used?
The concept is great but do we see any big players use authenticated feeds?
Thanks
Thomas S
Comment #11
Grayside commented@tps Sorry I've been busy in the last week.
My impression of something like tokenauth's concept is that it's the only practical way to use RSS feeds containing secured content with RSS Readers in general. Very few of them implement the secured RSS standards which we might otherwise use to make this happen. I've seen the approach around, but I can't start rattling off enterprise uses if that's what you are asking.
In my testing, it worked with Content Access. I will be making time in the next day or two to run through it again. Tokenauth should not have a problem with any standard access control module.
Comment #12
Grayside commentedConfirming that it works with Content Access. Are you using any other modules that control content access?
Comment #13
tps commentedHi Grayside
I will give it another test - thanks
Thomas S
Comment #14
jjbk commentedHaving the same problem on my site that uses the content access module, though it might be a conflict with another module i am using for permissions (login destination, menu per role, user protect). Either way, accessing a page that needs authentication with the token simply displays an access denied message.
Comment #15
Grayside commentedTokenauth has a module weight of -15 (in dev). Anything that operates earlier than that in hook_init() to change the current user object will be overridden. An example of this would be using Organic Groups User Roles at a lower weight than Tokenauth. The result would be OGUR checking to see if it should add roles tot he anonymous user, probably deciding not to, and ignoring the page load from then on.
Then, Tokenauth will proceed to load the user associated with the token as the current user, depriving OGUR of the chance to make changes.
I don't have time to really troubleshoot this right now. I'm hoping you can tell me ;)
Comment #16
gregglesI'm going to call this a fixed support request. There's a lot of great advice in here, but it seems no specific bug.