Remove unimplemented Keyrelay feature

Closes #715
This commit is contained in:
Artur Beljajev 2019-09-17 14:52:21 +03:00
parent 0893d5b6f2
commit fc71bf93e7
46 changed files with 21 additions and 1487 deletions

View file

@ -121,16 +121,6 @@ module Depp
}, op, Domain.construct_custom_params_hash(params)))
end
def confirm_keyrelay(domain_params)
xml = epp_xml.update({
name: { value: domain_params[:name] }
}, {
add: Domain.create_dnskeys_hash(domain_params)
})
current_user.request(xml)
end
def confirm_transfer(domain_params)
data = current_user.request(epp_xml.info(name: { value: domain_params[:name] }))
pw = data.css('pw').text

View file

@ -1,45 +0,0 @@
module Depp
class Keyrelay
attr_accessor :current_user, :epp_xml
def initialize(args = {})
self.current_user = args[:current_user]
self.epp_xml = EppXml::Keyrelay.new(cl_trid_prefix: current_user.tag)
end
def keyrelay(params)
custom_params = {}
if params[:legal_document].present?
type = params[:legal_document].original_filename.split('.').last.downcase
custom_params = {
_anonymus: [
legalDocument: { value: Base64.encode64(params[:legal_document].read), attrs: { type: type } }
]
}
end
xml = epp_xml.keyrelay({
name: { value: params['domain_name'] },
keyData: {
flags: { value: params['key_data_flags'] },
protocol: { value: params['key_data_protocol'] },
alg: { value: params['key_data_alg'] },
pubKey: { value: params['key_data_public_key'] }
},
authInfo: {
pw: { value: params['password'] }
},
expiry: expiry(params['expiry'])
}, custom_params)
current_user.request(xml)
end
def expiry(value)
ISO8601::Duration.new(value)
{ relative: { value: value } }
rescue => _e
{ absolute: { value: value } }
end
end
end