mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Logout command
This commit is contained in:
parent
b812ea384e
commit
44b257efa3
11 changed files with 90 additions and 1 deletions
|
@ -12,4 +12,8 @@ module Epp::Common
|
|||
def parsed_frame
|
||||
Nokogiri::XML(params[:frame]).remove_namespaces!
|
||||
end
|
||||
|
||||
def error
|
||||
render 'error'
|
||||
end
|
||||
end
|
||||
|
|
8
app/controllers/epp/commands_controller.rb
Normal file
8
app/controllers/epp/commands_controller.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
class Epp::CommandsController < ApplicationController
|
||||
include Epp::Common
|
||||
|
||||
private
|
||||
def create
|
||||
render '/epp/domains/create'
|
||||
end
|
||||
end
|
|
@ -17,4 +17,9 @@ class Epp::SessionsController < ApplicationController
|
|||
render 'login_fail'
|
||||
end
|
||||
end
|
||||
|
||||
def logout
|
||||
response.headers['X-EPP-Returncode'] = '1500'
|
||||
render 'logout'
|
||||
end
|
||||
end
|
||||
|
|
8
app/views/epp/domains/create.xml.builder
Normal file
8
app/views/epp/domains/create.xml.builder
Normal file
|
@ -0,0 +1,8 @@
|
|||
xml.instruct!
|
||||
xml.epp('xmlns' => 'urn:ietf:params:xml:ns:epp-1.0', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation' => 'urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd') do
|
||||
xml.response do
|
||||
xml.result('code' => '1000') do
|
||||
xml.msg('Command completed successfully')
|
||||
end
|
||||
end
|
||||
end
|
0
app/views/epp/error.xml.builder
Normal file
0
app/views/epp/error.xml.builder
Normal file
12
app/views/epp/sessions/logout.xml.builder
Normal file
12
app/views/epp/sessions/logout.xml.builder
Normal file
|
@ -0,0 +1,12 @@
|
|||
xml.instruct!
|
||||
xml.epp('xmlns' => 'urn:ietf:params:xml:ns:epp-1.0', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation' => 'urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd') do
|
||||
xml.response do
|
||||
xml.result('code' => '1500') do
|
||||
xml.msg('Command completed successfully; ending session', 'lang' => 'en')
|
||||
end
|
||||
end
|
||||
|
||||
xml.trID do
|
||||
xml.clTRID 'sample1trid'
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue