Problem/Motivation
Upgrade Tokenauth to D7 sufficiently that it can be developed towards a stable release.
Proposed resolution
Develop a patch in this queue that can update the D6 version of the code to D7. It is okay if the initial version of the patch does not include working Context.module or Drush integration, as long as the core behavior of the module is in place. Those can be tackled in dedicated issues against a 7.x development branch.
Remaining tasks
- Reroll patch for latest -dev.
- Remove functionality related to #990468: Setting to always add token to links.
- Per number #1024156-21: D7 port of tokenauth, administrative form is broken.
- Make sure non-working Context.module integration does not actually break sites with Context.module enabled.
User interface changes
Adjusting D6 conventions to D7 conventions. E.g., admin/settings/tokenauth to admin/configure/tokenauth.
API changes
None.
Original report by dloone
I'm building a D7 site for my motorcycle club, and need tokenauth. So I started working on a port. I'm new to Drupal 7 and new to PHP, but my day job is in Java so I'm comfortable with software development and web stuff. One aim of doing this was to get myself up to speed with Drupal and PHP.
Progress so far: The forms, permissions, etc have been converted, but some things are displaying quite right yet. The actual token authorisation is basically working. This took me a while to get working, since it looks like this area has changed significantly in D7, but I eventually found a way of doing it that isn't too ugly (but probably doesn't strictly conform to the API). It took a lot of rummaging around the D7 core, which was kind of the point anyway. It isn't yet rewriting outgoing URLs.
Anyway, assuming the project maintainers are interested, how should i get this back into the project. Should I just submit a patch? Or would you prefer to just let me submit the changes to CVS?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | tokenauth-1024156-2.patch | 26.71 KB | dloone |
| #6 | tokenauth-1024156-2.tar_.gz | 8.9 KB | dloone |
| #4 | tokenauth-1024156-1.patch | 21.19 KB | dloone |
| #4 | tokenauth-1024156-1.tar.gz | 8.3 KB | dloone |
Comments
Comment #1
Grayside commentedHi dloone! This is fantastic. I think it would be best for you to submit a tarball for review (or put it up on github et al). If you are interested in helping to maintain the D7 version of tokenauth going forward irakli and you can talk about CVS access to commit it directly.
Please change this issue to Needs Review once the code is available for review.
Comment #2
dloone commentedI'm happy to help maintain the D7 version. Will have a tarball in a copule of days.
In the meantime, I've got a quick question about the tokenauth_url_outbound_alter() function. I originally thought that the point of this was to append the auth token to any RSS feed links on the site. For eg, the rss.xml on the homepage would come up as http://foo/rss.xml?token=###, for me to right click on the RSS logo, select "copy URL", then paste that URL into my RSS reader. But when I looked at the function, it seems to become active only when the page is responding to a URL with an auth token. Like it's only putting tokens on URLs inside the RSS doc (rather than the URL of the RSS doc itself). Where am I going wrong?
Comment #3
Grayside commentedWhat you describe is exactly right. The goal with hook_url_outbound_alter() is that you authenticate via tokenauth, and once there, any other pages that can be accessed via tokenauth are just a click away.
This is only of moderate usefulness in an RSS context--I could image some of the content syndicated in the feed could be accessed via tokenauth, in which case this functionality would enable users to easily "Read More". It's functionality makes a little more sense when you configure Tokenauth for use with regular Drupal pages. I have successfully created nodes with permissive enough path settings.
What you describe in always appending the token to RSS links is being discussed in #990468.
The current behavior facilitates ease of use once you authenticate, the new functionality would facilitate getting authenticated via tokenauth without special effort on the part of the end user.
Comment #4
dloone commentedAh, yes. It does make more sense when you configure tokenauth with regular pages.
My use case is virtually identical to karschsp in #990468, so I'd like to include that in my changes. At the current state of development I'm adding the token to the rss.xml, which is kind of handy since it isn't printing the token value in the user profile yet.
Attached is a tar and a patch file of what I've got so far. It's still work in progress, but I"m using it on my test site as it is. I should be able to get it to beta level over the next couple of weeks. There's a TODO list in the README.
Comment #5
dloone commentedComment #6
dloone commentedAnother iteration. Changes: tokenauth_text is now working; integration with token.module now works. This patch replaces the previous one.
Comment #7
Grayside commentedI started skimming the patch version, and it's looking pretty good from what I've seen so far. I'd prefer to see #990468: Setting to always add token to links completed for D6 before having it broken version included in D7.
Comment #8
dloone commentedThanks for looking at that. I agree that it makes sense to remove my #990467(-like) addition. If/when you think it's ready for a dev or alpha release, let me know and I"ll make a patch that has it removed (plus has a copule of minor changes that fix some mistakes I introduced in the admin form).
Although I'm sensitive to the undesirability of doing two streams of work in parallel, the #990486 change is something I want for my site, so I'd be keen to get cracking on that as soon as practical.
Comment #9
sophiem commentedAfter installing this module with the patch on Drupal 7, the module is activated but I don't get a Tokenauth entry in the Configuration panel, I just get RSS Publishing and Aggregator in the Web service section. As a result I can't configure the module. I I don't get a Token tab in users either. Do you know what's wrong? Thx.
Comment #10
Grayside commented@dloone I am ready to start the 7.x branch, but I'd like to see a patch limited to what's actually in 6.x right now. If you've no time I'll proceed myself ;)
Comment #11
geerlingguy commentedSubscribe, would love to check this out on D7 once a dev is out.
Comment #12
killtheliterate commentedSubscribing. Any news about this port?
Comment #13
Taxoman commentedSubscribing
Comment #14
BenK commentedSubscribing
Comment #15
ajmartin commentedSubscribing
Comment #16
drubeedoo commentedSubscribing
Comment #17
murzArchived module from #6 post works very good for me on Drupal 7.x for RSS feed, thanks! Will be good to see official release...
Comment #18
a.siebel commentedsubscribe
Comment #19
kkrehl commentedSubscribing
Comment #20
Grayside commentedPlease do not subscribe to this issue. Instead, hit the green button by the issue metadata at the top of the page.
Comment #21
prjcarr commentedI have tested out this D7 port and I can get to the admin config page, but updates to the token length or activated pages will not save. Only the "user text" seems to save.
Comment #22
Grayside commentedI have not had time to wrangle the upgrade yet.
Just a reminder that this patch is on Needs Work:
I will create an issue summary for whomever first circles back to work on this.
Comment #23
Grayside commentedInitial port of Token Auth has been committed, and appears to work in all particulars I've tested. For additional bugs, please open issues as usual. I will tag an alpha release once someone else verifies the working status.
Comment #24
David_Rothstein commentedI can verify this is working. I installed it on a Drupal 7 site that needed tokens on authenticated RSS feeds and everything seemed to behave correctly (the site isn't live yet or anything, but it worked fine in local testing). So I think this module is ready to go for an alpha release.
I did notice that there seems to be a problem with the upgrade path from Drupal 6, though: #1670492: Upgrading from Drupal 6 to Drupal 7 breaks the 'tokenauth_text' variable
Comment #25
Taxoman commentedComment #26.0
(not verified) commentedAdded issue summary.