Authentication Hook

The authentication hook allows checking for a username and password pair in an external system, for example, LDAP. To do this, you need to extend the class pm_Hook_Auth. The class must be located in the directory plib/hooks/.

The following is an example of such a hook:

class Modules_MyExtension_Auth extends pm_Hook_Auth
    {
        public function auth($login, $password)
        {
            // TODO: add your implementation here
        }  
    }

The method must return a boolean value. If a username and password pair is valid, it should return true.

You can control the operation of the extension during run-time by implementing the method isEnabled.

 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.