class EPPClient::Base
This is the base class.
It can be used directly to talk to EPP servers that have no specific requirements.
Constants
- SCHEMAS
- SCHEMAS_EXT_IETF
Attributes
Public Class Methods
Required Attributes¶ ↑
:server
-
The EPP server to connect to
:client_id
-
The tag or username used with
<login>
requests. :password
-
The password used with
<login>
requests.
Optional Attributes¶ ↑
:port
-
The EPP standard port is 700. However, you can choose a different port to use.
:clTRID
-
The client transaction identifier is an element that EPP specifies MAY be used to uniquely identify the command to the server. The string “-<index>” will be added to it, index being incremented at each command. Defaults to “test-<pid>-<random>”
:lang
-
Set custom language attribute. Default is 'en'.
:services
-
Use custom EPP services in the <login> frame. The defaults use the EPP standard domain, contact and host 1.0 services.
:extensions
-
URLs to custom extensions to standard EPP. Use these to extend the standard EPP (e.g., AFNIC, smallregistry uses extensions). Defaults to none.
:version
-
Set the EPP version. Defaults to “1.0”.
:ssl_cert
-
The file containing the client certificate.
:ssl_key
-
The file containing the key of the certificate.
# File lib/epp-client/base.rb, line 82 def initialize(attrs) unless attrs.key?(:server) && attrs.key?(:client_id) && attrs.key?(:password) raise ArgumentError, 'server, client_id and password are required' end attrs.each do |k, v| begin send("#{k}=", v) rescue NoMethodError raise ArgumentError, "there is no #{k} argument" end end @port ||= 700 @lang ||= 'en' @services ||= EPPClient::SCHEMAS_URL.values_at('domain', 'contact', 'host') @extensions ||= [] @version ||= '1.0' @clTRID ||= "test-#{$PROCESS_ID}-#{rand(1000)}" @clTRID_index = 0 @context ||= OpenSSL::SSL::SSLContext.new @logged_in = false end
Public Instance Methods
# File lib/epp-client/base.rb, line 113 def debug @debug ||= $DEBUG || ENV['EPP_CLIENT_DEBUG'] end