[openstreetmap/openstreetmap-website] Add support for OAuth 2 (#3177)
Tom Hughes
notifications at github.com
Tue Apr 13 18:47:42 UTC 2021
This is a first pass at OAuth 2 support using doorkeeper.
I've kept the OAuth 2 configuration separate from the OAuth 1 configuration - it probably could be merged if we really wanted but hopefully we can get rid of OAuth 1 at some point...
The URL endpoints have been moved into `/oauth2/` to avoid conflicts with the OAuth 1 endpoints.
There's a test instance at https://oauth2.apis.dev.openstreetmap.org/.
Fixes #1408
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3177
-- Commit Summary --
* Add support for OAuth2 using doorkeeper
* Add tests for OAuth2
-- File Changes --
M .rubocop.yml (3)
M .rubocop_todo.yml (4)
M Gemfile (4)
M Gemfile.lock (6)
M app/abilities/ability.rb (3)
M app/abilities/api_capability.rb (50)
M app/controllers/api_controller.rb (12)
M app/controllers/application_controller.rb (4)
A app/controllers/oauth2_applications_controller.rb (28)
A app/controllers/oauth2_authorizations_controller.rb (8)
A app/controllers/oauth2_authorized_applications_controller.rb (8)
M app/models/access_token.rb (4)
M app/models/client_application.rb (7)
M app/models/user.rb (2)
A app/views/oauth2_applications/_application.html.erb (23)
A app/views/oauth2_applications/_form.html.erb (5)
A app/views/oauth2_applications/edit.html.erb (7)
A app/views/oauth2_applications/index.html.erb (13)
A app/views/oauth2_applications/new.html.erb (7)
A app/views/oauth2_applications/not_found.html.erb (1)
A app/views/oauth2_applications/show.html.erb (38)
A app/views/oauth2_authorizations/error.html.erb (5)
A app/views/oauth2_authorizations/new.html.erb (40)
A app/views/oauth2_authorizations/show.html.erb (5)
A app/views/oauth2_authorized_applications/_application.html.erb (15)
A app/views/oauth2_authorized_applications/index.html.erb (14)
M app/views/users/account.html.erb (4)
A config/initializers/doorkeeper.rb (464)
M config/locales/en.yml (59)
M config/routes.rb (6)
A db/migrate/20201004105659_create_doorkeeper_tables.rb (53)
M db/structure.sql (262)
A lib/oauth.rb (19)
A test/controllers/oauth2_applications_controller_test.rb (221)
A test/controllers/oauth2_authorizations_controller_test.rb (184)
A test/controllers/oauth2_authorized_applications_controller_test.rb (63)
A test/factories/oauth_access_grant.rb (9)
A test/factories/oauth_access_token.rb (6)
A test/factories/oauth_applications.rb (8)
A test/integration/oauth2_test.rb (170)
M test/test_helper.rb (6)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3177.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3177.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3177
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210413/f37208f8/attachment-0001.htm>
More information about the rails-dev
mailing list