Description


This function registers a server to use keyed authentication.


Examples 




https://manage2.cpanel.net/XMLregisterAuth.cgi?user=barney%40example.com&pickup=hi+there+have+you+met+ted%3F&service=license-suite-2000


https://manage2.cpanel.net/XMLregisterAuth.cgi?output=JSON&user=barney%40example.com&pickup=hi+there+have+you+met+ted%3F&service=license-suite-2000


https://manage2.cpanel.net/XMLregisterAuth.cgi?output=yaml&user=barney%40example .com&pickup=hi+there+have+you+met+ted%3F&service=license-suite-2000




<?php
    include("cpl.inc.php");
    $cpl = new cPanelLicensing();
    $cpl->registerAuth(array(
        "user" => "barney@example.com",
        "pickup" => "hi there have you met ted?",
        "service" => "license-suite-2000", 
		)
	);
 ?>

 

 



use cPanelLicensing;
my $cpl = cPanelLicensing->new();
$cpl->registerAuth(
	'user'    => 'barney\@example.com', 
	'pickup'  => 'hi there have you met ted?', 
	'service' => 'license-suite-2000',
);




<XMLRegisterAuth key="abcdefghijklmnopqrst" ip="192.0.32.10" reason="Successfully registered license-suite-2000 on 192.0.32.10" status="1" />




{
  "status": 1,
  "reason": "Successfully registered license-suite-2000 on 192.0.32.10"
  "key": "abcdefghijklmnopqrst"
  "ip": "192.168.0.20
}




---
status 1,
reason : Successfully registered license-suite-2000 on 192.0.32.10
key : ab1de2gh3jk4mn5pq6st
ip : 192.168.0.20




Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The account's username.

A valid username.

barney@example.com
pickupstring

Required

The account's pickup phrase.

A valid passphrase.

Use the Add a Pickup Phrase function to add pickup phrases.

hi there have you met ted?
servicestring

Required

The name of the service that uses the authentication scripts.

 

A valid script service.license-suite-2000

Returns

ReturnTypeDescriptionPossible valuesExample
reasonstringA message about the IP address authentication.A string value.
Successfully registered license-suite-2000 on 192.168.0.20
keystringA key to authenticate the IP address.A string value.
ab1de2gh3jk4mn5pq6st
ipstringThe account's IP address.

 

A valid IP address on the server.192.168.0.20
statusBooleanWhether the function succeeded.
  • 1 — Success.

  • 0 — Faulure.
1