mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 18:59:38 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
73257cce6b
6 changed files with 114 additions and 31 deletions
|
@ -1,6 +1,5 @@
|
|||
class Contact < ActiveRecord::Base
|
||||
# TODO: Foreign contact will get email with activation link/username/temp password
|
||||
# TODO: Phone number validation, in first phase very minimam in order to support current registries
|
||||
|
||||
include EppErrors
|
||||
|
||||
|
@ -20,7 +19,8 @@ class Contact < ActiveRecord::Base
|
|||
|
||||
validates :name, :phone, :email, :ident, :address, :registrar, :ident_type, presence: true
|
||||
|
||||
validates :phone, format: /\+[0-9]{1,3}\.[0-9]{1,14}?/ # /\+\d{3}\.\d+/
|
||||
# Phone nr validation is very minimam in order to support legacy requirements
|
||||
validates :phone, format: /\+[0-9]{1,3}\.[0-9]{1,14}?/
|
||||
validates :email, format: /@/
|
||||
validates :ident, format: /\d{4}-\d{2}-\d{2}/, if: proc { |c| c.ident_type == 'birthday' }
|
||||
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
# EPP integration specification for Estonian Internet Foundation
|
||||
|
||||
## Introduction
|
||||
Introduction text here
|
||||
[[Session related functions](epp/session.md)]
|
||||
[[Contact related functions](epp/contact.md)]
|
||||
[[Domain related functions](epp/domain.md)]
|
||||
[[Keyrelay related functions](epp/keyrelay.md)]
|
||||
Document moved to [new_location](/doc/epp/)
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
|
||||
## Introduction
|
||||
Introduction text here
|
||||
[[Session related functions](session.md)]
|
||||
[[Contact related functions](contact.md)]
|
||||
[[Domain related functions](domain.md)]
|
||||
[[Keyrelay related functions](keyrelay.md)]
|
||||
[Session related functions](session.md)
|
||||
[Contact related functions](contact.md)
|
||||
[Domain related functions](domain.md)
|
||||
[Keyrelay related functions](keyrelay.md)
|
||||
|
||||
Please study official The Extensible Provisioning Protocol (EPP):<br>
|
||||
http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol
|
||||
|
|
|
@ -1,21 +1,31 @@
|
|||
## Contact related functions
|
||||
|
||||
Please study official Cantact Mapping protocol:
|
||||
http://tools.ietf.org/html/rfc5733
|
||||
|
||||
More info at http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol
|
||||
|
||||
Contact Mapping protocol short version:
|
||||
|
||||
### Contact create
|
||||
|
||||
Field name Min-max Field description
|
||||
----------------------- ------- -----------------
|
||||
<create> 1
|
||||
<contact:create> 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
|
||||
<contact:voice> 1 Phone
|
||||
<contact:postalInfo> 1 Postal information container
|
||||
<contact:name> 1 Full name of the contact
|
||||
<contact:org> 0-1 Name of organization
|
||||
<contact:addr> 1 Address container
|
||||
<contact:street> 0-n Street name
|
||||
<contact:city> 1 City name
|
||||
<contact:sp> 0-1 State or province
|
||||
<contact:pc> 0-1 Postal code
|
||||
<contact:cc>` 1 Country code, 2 letters uppercase
|
||||
<contact:voice> 1 Phone number in format \+ddd.d+
|
||||
<contact:email> 1 E-mail
|
||||
<contact:Ident> 1 Contact identificator.
|
||||
Attribute: type="ico / op / passport / birthday"
|
||||
<contact:postalInfo> 1 Contact information
|
||||
<contact:name> 1 Full name
|
||||
<contact:addr> 1 Address
|
||||
<contact:street> 0-1 Street name
|
||||
<contact:city> 1 City name
|
||||
<contact:cc>` 1 Country code
|
||||
|
||||
<extension> 0-1
|
||||
<eis:extdata> 0-1 Attribute: xmlns:eis="urn:ee:eis:xml:epp:eis-1.0"
|
||||
<eis:legalDocument> 1 Base64 encoded document. Attribute: type="pdf"
|
||||
|
@ -24,3 +34,70 @@
|
|||
NB! Extension is not implemented yet!
|
||||
|
||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-create-command-successfully-creates-a-contact)
|
||||
|
||||
### Contact update
|
||||
|
||||
Field name Min-max Field description
|
||||
----------------------- ------- -----------------
|
||||
<update> 1
|
||||
<contact:update> 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
|
||||
<contact:id> 1 contact id, required
|
||||
<contact:chg> 1 Change container
|
||||
<contact:postalInfo> 1 Postal information container
|
||||
<contact:name> 0-1 Full name of the contact
|
||||
<contact:org> 0-1 Name of organization
|
||||
<contact:addr> 0-1 Address container
|
||||
<contact:street> 0-n Street name
|
||||
<contact:city> 0-1 City name
|
||||
<contact:sp> 0-1 State or province
|
||||
<contact:pc> 0-1 Postal code
|
||||
<contact:cc> 0-1 Country code
|
||||
<contact:voice> 0-1 Phone number in format \+ddd.d+
|
||||
<contact:email> 0-1 E-mail
|
||||
<contact:Ident> 1 Contact identificator.
|
||||
<contact:authInfo> 0-1 Required if registrar is not the owner of the contact.
|
||||
<contact:pw> 1 Contact password. Attribute: roid="String"
|
||||
|
||||
|
||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-update-command-is-succesful)
|
||||
|
||||
### Contact delete
|
||||
|
||||
Field name Min-max Field description
|
||||
----------------------- ------- -----------------
|
||||
<delete> 1
|
||||
<contact:delete> 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
|
||||
<contact:id> 1 Contact id
|
||||
<clTRID> 0-1 Client transaction id
|
||||
|
||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-delete-command-deletes-contact)
|
||||
|
||||
|
||||
### Contact check
|
||||
|
||||
Field name Min-max Field description
|
||||
----------------------- ------- -----------------
|
||||
<check> 1
|
||||
<contact:check> 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
|
||||
<contact:id> 1-n Contact id
|
||||
<clTRID> 0-1 Client transaction id
|
||||
|
||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-check-command-returns-info-about-contact-availability)
|
||||
|
||||
|
||||
### Contact info
|
||||
|
||||
Field name Min-max Field description
|
||||
----------------------- ------- -----------------
|
||||
<info> 1
|
||||
<contact:info> 1 Attribute: xmlns:contact="urn:ietf:params:xml:ns:contact-1.0"
|
||||
<contact:id> 1-n Contact id
|
||||
<clTRID> 0-1 Client transaction id
|
||||
|
||||
[EXAMPLE REQUEST AND RESPONSE](/doc/epp-examples.md#epp-contact-with-valid-user-info-command-discloses-items-to-owner)
|
||||
|
||||
|
||||
### Domain renew
|
||||
|
||||
Renewal semantics do not apply to contact objects, so there is no
|
||||
mapping defined for the EPP <renew> command.
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
## Domain related functions
|
||||
|
||||
Please study official Domain Name Mapping protocol:
|
||||
http://tools.ietf.org/html/rfc5731
|
||||
|
||||
More info at http://en.wikipedia.org/wiki/Extensible_Provisioning_Protocol
|
||||
|
||||
Domain name mapping protocol short version:
|
||||
|
||||
|
||||
### Domain create
|
||||
|
||||
Field name Min-max Field description
|
||||
|
|
|
@ -18,7 +18,7 @@ describe 'EPP Contact', epp: true do
|
|||
let(:epp_xml) { EppXml::Contact.new(cl_trid: 'ABC-12345') }
|
||||
|
||||
context 'with valid user' do
|
||||
before(:each) do
|
||||
before do
|
||||
Fabricate(:epp_user)
|
||||
Fabricate(:epp_user, username: 'zone', registrar: zone)
|
||||
Fabricate(:epp_user, username: 'elkdata', registrar: elkdata)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue