Change routes to use match ..., via: [] syntax

This commit is contained in:
Emelia Smith 2024-10-16 21:57:38 +02:00
parent 928c78ff4a
commit 8dd383e385
No known key found for this signature in database

View File

@ -65,11 +65,10 @@ Rails.application.routes.draw do
end
namespace :oauth do
get 'userinfo', to: 'userinfo#show', defaults: { format: 'json' }
# As this is borrowed from OpenID, the specification says we must also support
# POST for the userinfo endpoint:
# https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
post 'userinfo', to: 'userinfo#show', defaults: { format: 'json' }
match 'userinfo', via: [:get, :post], to: 'userinfo#show', defaults: { format: 'json' }
end
scope path: '.well-known' do