Developer Center

Single Sign-On

With this feature, the client or administrator will access the hosting control panel with one click via the service detail.

If you add these functions to the class, the enter button will appear automatically in the service detail.

There is no return value, it will reflect the output of the function to the user when the enter link is clicked.

Separate functions are used for the client and the administrator.

Sample Function for Client Panel

public function use_clientArea_SingleSignOn()
{
    $api_result     = 'OK|bmd5d0p384ax7t26zr9wlwo4f62cf8g6z0ld';

    if(substr($api_result,0,2) != 'OK'){
        echo "An error has occurred, unable to access.";
        return false;
    }

    $token          = substr($api_result,2);
    $url            = 'https://modulewebsite.com/api/access/'.$token;

    Utility::redirect($url);

    echo "Redirecting...";
}

Sample Function for Administrator Panel

public function use_adminArea_SingleSignOn()
{
    $api_result     = 'OK|bmd5d0p384ax7t26zr9wlwo4f62cf8g6z0ld';

    if(substr($api_result,0,2) != 'OK'){
        echo "An error has occurred, unable to access.";
        return false;
    }

    $token          = substr($api_result,2);
    $url            = 'https://modulewebsite.com/api/access/'.$token;

    Utility::redirect($url);

    echo "Redirecting...";
}
 
Fixed Functions and Return Defining Custom Page and Function for Client Area

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top

New Year's Special Discount

"Startup Lifetime" and "Professional Lifetime" licenses are 30% off!

Coupon Code:
HAPPYYEARS30 Copied!
Discount Rate 30%
Expiration Date December 31, 2024