0
0
Fork 0

Add userinfo oauth endpoint (#32548)

This commit is contained in:
Emelia Smith 2024-10-30 15:38:10 +01:00 committed by GitHub
parent 0a599d08d8
commit e1b7382ea6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 112 additions and 12 deletions

View file

@ -64,6 +64,13 @@ Rails.application.routes.draw do
tokens: 'oauth/tokens'
end
namespace :oauth do
# 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
match 'userinfo', via: [:get, :post], to: 'userinfo#show', defaults: { format: 'json' }
end
scope path: '.well-known' do
scope module: :well_known do
get 'oauth-authorization-server', to: 'oauth_metadata#show', as: :oauth_metadata, defaults: { format: 'json' }