AppserverIo\Appserver\ServletEngine\Security\Auth\Spi\NamingDirectoryLoginModule::getUsersPassword PHP Method

getUsersPassword() protected method

Returns the password for the user from the naming directory.
protected getUsersPassword ( ) : AppserverIo\Lang\String
return AppserverIo\Lang\String The user's password
    protected function getUsersPassword()
    {
        try {
            // load the application context
            $application = RequestHandler::getApplicationContext();
            // load and return the user's password or throw an exception
            return new String($application->search(sprintf('%s/%s', $this->userPathPrefix, $this->getUsername())));
        } catch (\Exception $e) {
            throw new LoginException('No matching username found in naming directory');
        }
    }