Remove auth info from domain create builder

This commit is contained in:
Martin Lensment 2014-09-04 10:48:59 +03:00
parent 6352ed340f
commit 1bf886a6bf
3 changed files with 3 additions and 15 deletions

View file

@ -84,7 +84,7 @@ module Epp::DomainsHelper
## CREATE
def validate_domain_create_request
@ph = params_hash['epp']['command']['create']['create']
xml_attrs_present?(@ph, [['name'], ['ns'], ['authInfo'], ['contact'], ['registrant']])
xml_attrs_present?(@ph, [['name'], ['ns'], ['contact'], ['registrant']])
end
def domain_create_params

View file

@ -19,9 +19,6 @@ describe 'EPP Helper', epp: true do
<domain:contact type="admin">sh8013</domain:contact>
<domain:contact type="tech">sh8013</domain:contact>
<domain:contact type="tech">sh801333</domain:contact>
<domain:authInfo>
<domain:pw>2fooBAR</domain:pw>
</domain:authInfo>
</domain:create>
</create>
<clTRID>ABC-12345</clTRID>
@ -50,9 +47,6 @@ describe 'EPP Helper', epp: true do
<domain:contact type="admin">2323rafaf</domain:contact>
<domain:contact type="tech">3dgxx</domain:contact>
<domain:contact type="tech">345xxv</domain:contact>
<domain:authInfo>
<domain:pw>sdgdgd4esfsa</domain:pw>
</domain:authInfo>
</domain:create>
</create>
<clTRID>ABC-12345</clTRID>
@ -70,8 +64,7 @@ describe 'EPP Helper', epp: true do
{ contact_value: '2323rafaf', contact_type: 'admin' },
{ contact_value: '3dgxx', contact_type: 'tech' },
{ contact_value: '345xxv', contact_type: 'tech' }
],
pw: 'sdgdgd4esfsa'
]
)
generated = Nokogiri::XML(xml).to_s.squish
@ -98,8 +91,7 @@ describe 'EPP Helper', epp: true do
period: false,
nameservers: [],
registrant: false,
contacts: [],
authInfo: false
contacts: []
)
generated = Nokogiri::XML(xml).to_s.squish

View file

@ -84,10 +84,6 @@ module Epp
xml_params[:contacts].each do |x|
xml.tag!('domain:contact', x[:contact_value], 'type' => (x[:contact_type]))
end if xml_params[:contacts].any?
xml.tag!('domain:authInfo') do
xml.tag!('domain:pw', xml_params[:pw] || '2fooBAR')
end if xml_params[:authInfo] != false
end
end
xml.clTRID 'ABC-12345'