Child pages
  • WHM API 1 Functions - disable_failing_authentication_providers
Skip to end of metadata
Go to start of metadata

 

Description

This function disables any enabled identity provider modules that fail to load.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/disable_failing_authentication_providers?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/disable_failing_authentication_providers?api.version=1
 Command Line
whmapi1 disable_failing_authentication_providers


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{  
   "data":{  
      "payload":[  
         {  
            "failures_to_disable":[  

            ],
            "disabled_services":[  
               "cpaneld",
               "webmaild",
               "whostmgrd"
            ],
            "provider_namespace":"Cpanel::Security::Authn::Provider::Facebook",
            "provider_failure":"(ERR mcddbv) The system failed to load the module "Cpanel::Security::Authn::Provider::Facebook" because of an error: Can't locate Cpanel/Security/Authn/Provider/Facebook.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4 /opt/cpanel/perl5/514/site_lib/i386-linux-64int /opt/cpanel/perl5/514/site_lib /var/cpanel/perl) at (eval 143) line 1.\nBEGIN failed--compilation aborted at (eval 143) line 1.\n",
            "provider_name":"facebook"
         }
      ]
   },
   "metadata":{  
      "version":1,
      "reason":"OK",
      "result":"1",
      "command":"disable_failing_authentication_providers"
   }
}
 Output (XML)
<result>
    <data>
        <payload>
            <disabled_services>cpaneld</disabled_services>
            <disabled_services>webmaild</disabled_services>
            <disabled_services>whostmgrd</disabled_services>
            <provider_namespace>Cpanel::Security::Authn::Provider::Google</provider_namespace>
            <provider_failure>
                (ERR rbesj4) The system failed to load the module &#x201C;Cpanel::Security::Authn::Provider::Google&#x201D; because of an error: Can't locate Cpanel/Security/Authn/Provider/Google.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4 /opt/cpanel/perl5/514/site_lib/i386-linux-64int /opt/cpanel/perl5/514/site_lib /var/cpanel/perl) at (eval 143) line 1. BEGIN failed--compilation aborted at (eval 143) line 1.
            </provider_failure>
            <provider_name>google</provider_name>
        </payload>
        <payload>
            <disabled_services>cpaneld</disabled_services>
            <disabled_services>webmaild</disabled_services>
            <disabled_services>whostmgrd</disabled_services>
            <provider_namespace>Cpanel::Security::Authn::Provider::Facebook</provider_namespace>
            <provider_failure>
                (ERR gnuse5) The system failed to load the module &#x201C;Cpanel::Security::Authn::Provider::Facebook&#x201D; because of an error: Can't locate Cpanel/Security/Authn/Provider/Facebook.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4 /opt/cpanel/perl5/514/site_lib/i386-linux-64int /opt/cpanel/perl5/514/site_lib /var/cpanel/perl) at (eval 155) line 1. BEGIN failed--compilation aborted at (eval 155) line 1.
            </provider_failure>
            <provider_name>facebook</provider_name>
        </payload>
        <payload>
            <disabled_services>cpaneld</disabled_services>
            <disabled_services>webmaild</disabled_services>
            <disabled_services>whostmgrd</disabled_services>
            <provider_namespace>Cpanel::Security::Authn::Provider::Amazon</provider_namespace>
            <provider_failure>
                (ERR 7v99tu) The system failed to load the module &#x201C;Cpanel::Security::Authn::Provider::Amazon&#x201D; because of an error: Can't locate Cpanel/Security/Authn/Provider/Amazon.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4 /opt/cpanel/perl5/514/site_lib/i386-linux-64int /opt/cpanel/perl5/514/site_lib /var/cpanel/perl) at (eval 156) line 1. BEGIN failed--compilation aborted at (eval 156) line 1.
            </provider_failure>
            <provider_name>amazon</provider_name>
        </payload>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>disable_failing_authentication_providers</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
payloadhashThis hash returns information about the external authentication identity provider module failures.This hash includes the provider_name, provider_namespace, provider_failure returns and the disabled_services, and failures_to_disable arrays. 

provider_name

string

The external authentication identity provider to disable.

The function returns this value in the payload hash.

A valid external authentication identity provider's name.
cpanelid

provider_namespace

string

The external authentication identity provider module's namespace.

The function returns this value in the payload hash.

A valid module namespace location.

Cpanel::Security::Authn::Provider::CpanelID

provider_failure

string

A description of the failure

The function returns this value in the payload hash.

A valid string.
 Click to view...
(ERR mcddbv) The system failed to load the module “Cpanel::Security::Authn::Provider::Facebook” because of an error: Can't locate Cpanel/Security/Authn/Provider/Facebook.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4 /opt/cpanel/perl5/514/site_lib/i386-linux-64int /opt/cpanel/perl5/514/site_lib /var/cpanel/perl) at (eval 143) line 1.\nBEGIN failed--compilation aborted at (eval 143) line 1.\n

disabled_services

array of strings

A list of the services for which the external authentication identity provider was previously disabled.

The function returns this value in the payload hash.

A list of valid cPanel service names.cpaneld

failures_to_disable

array of hashes

An array of hashes that contain the services for which the system fails to disable the module.

The function returns this value in the payload hash.

This array of hashes includes the service_name and failure returns. 

service_name

string

A service for which the system failed to disable the external authentication identity provider.

The function returns this value in the failures_to_disable hash.

A valid cPanel service name.whostmgrd

failure

string

A description of the failure to disable the identity provider module for that module.

The function returns this value in the failures_to_disable hash.

A valid string.A witty and clever failure message that's also informative.