line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## Domain Registry Interface, .AERO Domain EPP extension commands |
2
|
|
|
|
|
|
|
## |
3
|
|
|
|
|
|
|
## Copyright (c) 2006-2008,2013 Patrick Mevzek . All rights reserved. |
4
|
|
|
|
|
|
|
## |
5
|
|
|
|
|
|
|
## This file is part of Net::DRI |
6
|
|
|
|
|
|
|
## |
7
|
|
|
|
|
|
|
## Net::DRI is free software; you can redistribute it and/or modify |
8
|
|
|
|
|
|
|
## it under the terms of the GNU General Public License as published by |
9
|
|
|
|
|
|
|
## the Free Software Foundation; either version 2 of the License, or |
10
|
|
|
|
|
|
|
## (at your option) any later version. |
11
|
|
|
|
|
|
|
## |
12
|
|
|
|
|
|
|
## See the LICENSE file that comes with this distribution for more details. |
13
|
|
|
|
|
|
|
#################################################################################################### |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
package Net::DRI::Protocol::EPP::Extensions::AERO::Domain; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
925
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
18
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
4
|
use Net::DRI::Exception; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
391
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=pod |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Net::DRI::Protocol::EPP::Extensions::AERO::Domain - .AERO EPP Domain extension commands for Net::DRI |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Please see the README file for details. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 SUPPORT |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
For now, support questions should be sent to: |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Enetdri@dotandco.comE |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Please also see the SUPPORT file in the distribution. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 SEE ALSO |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Ehttp://www.dotandco.com/services/software/Net-DRI/E |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHOR |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Patrick Mevzek, Enetdri@dotandco.comE |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 COPYRIGHT |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Copyright (c) 2006-2008,2013 Patrick Mevzek . |
51
|
|
|
|
|
|
|
All rights reserved. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
54
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
55
|
|
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or |
56
|
|
|
|
|
|
|
(at your option) any later version. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
See the LICENSE file that comes with this distribution for more details. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
#################################################################################################### |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub register_commands |
65
|
|
|
|
|
|
|
{ |
66
|
0
|
|
|
0
|
0
|
|
my ($class,$version)=@_; |
67
|
0
|
|
|
|
|
|
my %tmp=( |
68
|
|
|
|
|
|
|
create => [ \&create, undef ], |
69
|
|
|
|
|
|
|
info => [ undef, \&info_parse ], |
70
|
|
|
|
|
|
|
); |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
return { 'domain' => \%tmp }; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
#################################################################################################### |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub build_command_extension |
78
|
|
|
|
|
|
|
{ |
79
|
0
|
|
|
0
|
0
|
|
my ($mes,$epp,$tag)=@_; |
80
|
0
|
|
|
|
|
|
return $mes->command_extension_register($tag,sprintf('xmlns:aero="%s" xsi:schemaLocation="%s %s"',$mes->nsattrs('aero'))); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub create |
84
|
|
|
|
|
|
|
{ |
85
|
0
|
|
|
0
|
0
|
|
my ($epp,$domain,$rd)=@_; |
86
|
0
|
|
|
|
|
|
my $mes=$epp->message(); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Net::DRI::Exception::usererr_insufficient_parameters('ens attribute is mandatory, as ref hash with keys auth_id and auth_key') |
89
|
0
|
0
|
0
|
|
|
|
unless (exists($rd->{ens}) && (ref($rd->{ens}) eq 'HASH') && exists($rd->{ens}->{auth_id}) && $rd->{ens}->{auth_id} && exists($rd->{ens}->{auth_key}) && $rd->{ens}->{auth_key}); |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
0
|
|
|
|
|
|
my @n; |
92
|
0
|
|
|
|
|
|
push @n,['aero:ensAuthID',$rd->{ens}->{auth_id}]; |
93
|
0
|
|
|
|
|
|
push @n,['aero:ensAuthKey',$rd->{ens}->{auth_key}]; |
94
|
|
|
|
|
|
|
|
95
|
0
|
|
|
|
|
|
my $eid=build_command_extension($mes,$epp,'aero:create'); |
96
|
0
|
|
|
|
|
|
$mes->command_extension($eid,\@n); |
97
|
0
|
|
|
|
|
|
return; |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
sub info_parse |
101
|
|
|
|
|
|
|
{ |
102
|
0
|
|
|
0
|
0
|
|
my ($po,$otype,$oaction,$oname,$rinfo)=@_; |
103
|
0
|
|
|
|
|
|
my $mes=$po->message(); |
104
|
0
|
0
|
|
|
|
|
return unless $mes->is_success(); |
105
|
|
|
|
|
|
|
|
106
|
0
|
|
|
|
|
|
my $infdata=$mes->get_extension('aero','infData'); |
107
|
0
|
0
|
|
|
|
|
return unless $infdata; |
108
|
|
|
|
|
|
|
|
109
|
0
|
|
|
|
|
|
my %ens; |
110
|
0
|
|
|
|
|
|
my $c=$infdata->getFirstChild(); |
111
|
0
|
|
|
|
|
|
while($c) |
112
|
|
|
|
|
|
|
{ |
113
|
0
|
0
|
|
|
|
|
next unless ($c->nodeType() == 1); ## only for element nodes |
114
|
0
|
|
0
|
|
|
|
my $name=$c->localname() || $c->nodeName(); |
115
|
0
|
0
|
|
|
|
|
next unless $name; |
116
|
|
|
|
|
|
|
|
117
|
0
|
0
|
|
|
|
|
if ($name eq 'ensAuthID') |
118
|
|
|
|
|
|
|
{ |
119
|
0
|
|
|
|
|
|
$ens{auth_id}=$c->getFirstChild()->getData(); |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
0
|
|
|
|
|
|
} continue { $c=$c->getNextSibling(); } |
123
|
|
|
|
|
|
|
|
124
|
0
|
|
|
|
|
|
$rinfo->{domain}->{$oname}->{ens}=\%ens; |
125
|
0
|
|
|
|
|
|
return; |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
#################################################################################################### |
129
|
|
|
|
|
|
|
1; |