mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
Customize login URLs for client certificate authentication
Certificate is now asked only when login form is submitted, not before
This commit is contained in:
parent
1d95c1ccbc
commit
aa42220ca1
1 changed files with 14 additions and 3 deletions
|
@ -22,9 +22,8 @@ Rails.application.routes.draw do
|
||||||
namespace :registrar do
|
namespace :registrar do
|
||||||
root 'dashboard#show'
|
root 'dashboard#show'
|
||||||
|
|
||||||
# /registrar/sessions path is hardcoded in Apache config for certificate-based authentication
|
devise_for :users, path: '', class_name: 'ApiUser', skip: %i[sessions]
|
||||||
# See https://github.com/internetee/registry/blob/master/README.md#installation
|
|
||||||
devise_for :users, path: 'sessions', class_name: 'ApiUser'
|
|
||||||
devise_scope :registrar_user do
|
devise_scope :registrar_user do
|
||||||
get 'login/mid' => 'sessions#login_mid'
|
get 'login/mid' => 'sessions#login_mid'
|
||||||
post 'login/mid' => 'sessions#mid'
|
post 'login/mid' => 'sessions#mid'
|
||||||
|
@ -96,6 +95,18 @@ Rails.application.routes.draw do
|
||||||
get 'pay/go/:bank' => 'payments#pay', as: 'payment_with'
|
get 'pay/go/:bank' => 'payments#pay', as: 'payment_with'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scope :registrar do
|
||||||
|
devise_scope :registrar_user do
|
||||||
|
get 'sign_in', to: 'registrar/sessions#new', as: :new_registrar_user_session
|
||||||
|
|
||||||
|
# /registrar/sessions path is hardcoded in Apache config for certificate-based authentication
|
||||||
|
# See https://github.com/internetee/registry/blob/master/README.md#installation
|
||||||
|
post 'sessions', to: 'registrar/sessions#create', as: :registrar_user_session
|
||||||
|
|
||||||
|
delete 'sign_out', to: 'registrar/sessions#destroy', as: :destroy_registrar_user_session
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
namespace :registrant do
|
namespace :registrant do
|
||||||
root 'domains#index'
|
root 'domains#index'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue