Merge remote-tracking branch 'parent/main' into upstream-20240716
This commit is contained in:
commit
adee1645a3
203 changed files with 1707 additions and 1067 deletions
|
@ -70,12 +70,16 @@ Rails.application.routes.draw do
|
|||
tokens: 'oauth/tokens'
|
||||
end
|
||||
|
||||
get '.well-known/oauth-authorization-server', to: 'well_known/oauth_metadata#show', as: :oauth_metadata, defaults: { format: 'json' }
|
||||
get '.well-known/host-meta', to: 'well_known/host_meta#show', as: :host_meta, defaults: { format: 'xml' }
|
||||
get '.well-known/nodeinfo', to: 'well_known/node_info#index', as: :nodeinfo, defaults: { format: 'json' }
|
||||
get '.well-known/webfinger', to: 'well_known/webfinger#show', as: :webfinger
|
||||
get '.well-known/change-password', to: redirect('/auth/edit')
|
||||
get '.well-known/proxy', to: redirect { |_, request| "/authorize_interaction?#{request.params.to_query}" }
|
||||
scope path: '.well-known' do
|
||||
scope module: :well_known do
|
||||
get 'oauth-authorization-server', to: 'oauth_metadata#show', as: :oauth_metadata, defaults: { format: 'json' }
|
||||
get 'host-meta', to: 'host_meta#show', as: :host_meta, defaults: { format: 'xml' }
|
||||
get 'nodeinfo', to: 'node_info#index', as: :nodeinfo, defaults: { format: 'json' }
|
||||
get 'webfinger', to: 'webfinger#show', as: :webfinger
|
||||
end
|
||||
get 'change-password', to: redirect('/auth/edit'), as: nil
|
||||
get 'proxy', to: redirect { |_, request| "/authorize_interaction?#{request.params.to_query}" }, as: nil
|
||||
end
|
||||
|
||||
get '/nodeinfo/2.0', to: 'well_known/node_info#show', as: :nodeinfo_schema
|
||||
|
||||
|
@ -101,19 +105,15 @@ Rails.application.routes.draw do
|
|||
|
||||
namespace :auth do
|
||||
resource :setup, only: [:show, :update], controller: :setup
|
||||
resource :challenge, only: [:create], controller: :challenges
|
||||
resource :challenge, only: [:create]
|
||||
get 'sessions/security_key_options', to: 'sessions#webauthn_options'
|
||||
post 'captcha_confirmation', to: 'confirmations#confirm_captcha', as: :captcha_confirmation
|
||||
end
|
||||
end
|
||||
|
||||
devise_for :users, path: 'auth', format: false, controllers: {
|
||||
omniauth_callbacks: 'auth/omniauth_callbacks',
|
||||
sessions: 'auth/sessions',
|
||||
registrations: 'auth/registrations',
|
||||
passwords: 'auth/passwords',
|
||||
confirmations: 'auth/confirmations',
|
||||
}
|
||||
scope module: :auth do
|
||||
devise_for :users, path: 'auth', format: false
|
||||
end
|
||||
|
||||
with_options constraints: ->(req) { req.format.nil? || req.format.html? } do
|
||||
get '/users/:username', to: redirect_with_vary('/@%{username}')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue