Commit graph

15 commits

Author SHA1 Message Date
Tom Hughes
f0feca800d Replace attr_accessible with strong parameters 2013-09-21 11:35:46 +01:00
Tom Hughes
97e0d5ad1f Add a new write_notes permission needed for OAuth access to notes 2013-03-28 18:50:18 +00:00
Tom Hughes
53fe84fbef Delete tokens for an application when the application is deleted 2012-04-23 21:30:41 +01:00
Tom Hughes
1340fca8f1 Turn on mass assignment protection
Require any attribute that is going to be mass assigned to be
whitelisted, and whitelist those attributes which need it
2012-03-06 08:54:45 +00:00
Tom Hughes
7b89dc6349 Make OAuth work again 2011-11-16 21:13:25 +00:00
Tom Hughes
8ae5d94b2f Update some more queries to use AREL in place of deprecated methods 2011-11-14 09:42:51 +00:00
Tom Hughes
17f4e58e46 Use before_validation with :on rather than before_validation_on_xxx 2011-11-14 09:42:40 +00:00
Tom Hughes
6d5c551a7c Simplify URL scheme name matching in OAuth callback URLs a little 2011-05-11 22:24:38 +01:00
Mendhak
9375b397fa Allow any valid (per RFC 3986) scheme name in OAuth callback URLs
Changed the callback_url regex so that you can have custom schemes such
as myapp: or my-lovely-app: instead of just http and https. This should
help with mobile development where users can authorize with OSM in their
browser and are automatically redirected to the registered app.
2011-05-11 22:23:06 +01:00
Tom Hughes
0a52a4eb07 Implement automatic OAuth setup for Potlatch 2 2010-11-29 12:20:22 +00:00
Tom Hughes
1c3a9ee62b Update oauth models and controllers for OAuth 1.0a support 2010-09-21 16:20:30 +01:00
Tom Hughes
406b46e49b Revert "Switch to using oauth-plugin as a gem"
This reverts commit 41a123334b.
2010-06-07 16:01:04 +01:00
Tom Hughes
41a123334b Switch to using oauth-plugin as a gem
Use the oauth-plugin as a gem instead of carrying a local copy.

This also required that commit eff06faf46 be
reverted as it changed the plugin. I don't think the cosmetic improvement
from that patch is worth the hassle of carrying local changes to the plugin.
2010-05-24 12:58:27 +01:00
Matt Amos
eff06faf46 Moved find_token method into the token class, since that seems a more appropriate place for it. 2009-08-03 14:00:29 +00:00
Matt Amos
b8f6dbd403 Adding initial version of the OAuth token authentication method. This adds basic OAuth support for registering apps, getting and revoking keys, etc... The tokens come with 6 separate permissions bits; read/write user preferences, write diaries, write API and read/write GPS traces. Needs more tests. 2009-06-22 16:54:37 +00:00