main
 1Rails.application.routes.draw do
 2  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
 3  post "/session/logout" => "sessions#destroy", as: :logout
 4  post "/session/new" => "sessions#new"
 5  post '/oauth/token', to: 'oauth/tokens#create'
 6  resource :mfa, only: [:new, :create]
 7  resource :metadata, only: [:show]
 8  resource :session, only: [:new, :show, :create, :destroy]
 9  resources :registrations, only: [:new, :create]
10  resource :response, only: [:show]
11  namespace :my do
12    resource :dashboard, only: [:show]
13    resource :mfa, only: [:show, :new, :edit, :create, :destroy] do
14      member do
15        post :test
16      end
17    end
18    resources :audits, only: [:index]
19    resources :clients, only: [:index, :new, :create]
20    resources :sessions, only: [:index, :destroy]
21  end
22  namespace :oauth do
23    resource :authorizations, only: [:show, :create]
24    resource :me, only: [:show]
25    resources :clients, only: [:show, :create, :update]
26    resource :tokens, only: [:create] do
27      post :introspect
28      post :revoke
29    end
30  end
31  namespace :scim do
32    namespace :v2, defaults: { format: :scim } do
33      post ".search", to: "search#index"
34
35      get 'Groups/:id', to: 'groups#show'
36      post :Groups, to: "groups#create"
37      put 'Groups/:id', to: "groups#update"
38      resources :groups, only: [:index]
39
40      get :ResourceTypes, to: "resource_types#index"
41      get 'ResourceTypes/:id', to: "resource_types#show"
42      resources :resource_types, only: [:index, :show]
43
44      get :Schemas, to: 'schemas#index'
45      get 'Schemas/:id', to: "schemas#show"
46      resources :schemas, only: [:index, :show], constraints: { id: /.+/ }
47
48      get :ServiceProviderConfig, to: "service_providers#show"
49
50      get 'Users/:id', to: 'users#show'
51      post :Users, to: "users#create"
52      put 'Users/:id', to: "users#update"
53      resources :users, only: [:index, :show, :create, :update, :destroy]
54
55      match 'Me', to: lambda { |env| [501, {}, ['']] }, via: [:get, :post, :put, :patch, :delete]
56      match 'Bulk', to: lambda { |env| [501, {}, ['']] }, via: [:post]
57    end
58  end
59  get "/.well-known/oauth-authorization-server", to: "oauth/metadata#show"
60  direct :documentation do
61    root_url + 'doc'
62  end
63  root to: "sessions#new"
64end
65ActiveSupport::Notifications.instrument 'proof.routes_loaded'