Require authentication on EPP logout

#700
This commit is contained in:
Artur Beljajev 2018-02-14 01:17:51 +02:00
parent 2ce4fa9ce0
commit ec43586ef4
3 changed files with 44 additions and 17 deletions

View file

@ -124,6 +124,15 @@ class Epp::SessionsController < EppController
end
def logout
unless signed_in?
epp_errors << {
code: 2201,
msg: 'Authorization error'
}
handle_errors
return
end
@api_user = current_user # cache current_user for logging
epp_session.destroy
response.headers['X-EPP-Returncode'] = '1500'