mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Allow logging in with only username
This commit is contained in:
parent
34a1bde3e4
commit
316f9376fe
3 changed files with 15 additions and 4 deletions
|
@ -4,8 +4,8 @@ class Epp::SessionsController < EppController
|
|||
end
|
||||
|
||||
def login
|
||||
# pki login
|
||||
if request.env['HTTP_SSL_CLIENT_S_DN_CN'] == login_params[:username]
|
||||
# Allow login with only username
|
||||
if request.ip == APP_CONFIG['webclient_ip'] && login_params[:password].nil?
|
||||
@api_user = ApiUser.find_by(username: login_params[:username])
|
||||
else
|
||||
@api_user = ApiUser.find_by(login_params)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue