Plugin Directory

Changeset 1996343


Ignore:
Timestamp:
12/17/2018 11:49:36 AM (6 years ago)
Author:
neosit
Message:

da77dbc565f61b31db9279d1cc2e62f65e51c851 updated readme.txt for 2.1.7 release

Location:
next-active-directory-integration/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • next-active-directory-integration/trunk/classes/Adi/Authentication/LoginService.php

    r1986677 r1996343  
    8989    {
    9090        add_filter('authenticate', array($this, 'authenticate'), 10, 3);
    91         add_filter(NEXT_AD_INT_PREFIX . 'auth_before_create_or_update_user', array($this, 'beforeCreateOrUpdateUser'), 10 , 2);
    92         add_filter(NEXT_AD_INT_PREFIX . 'auth_after_create_or_update_user', array($this, 'afterCreateOrUpdateUser'), 10, 3);
    9391
    9492        // disable 'lost password' feature
     
    102100        }
    103101    }
     102
     103    /**
     104     * Register custom authentication hooks required during the authentication process.
     105     */
     106    public function registerAuthenticationHooks()
     107    {
     108        add_filter(NEXT_AD_INT_PREFIX . 'auth_before_create_or_update_user', array($this, 'beforeCreateOrUpdateUser'), 10 , 2);
     109        add_filter(NEXT_AD_INT_PREFIX . 'auth_after_create_or_update_user', array($this, 'afterCreateOrUpdateUser'), 10, 3);
     110    }
    104111
    105112    /**
     
    826833     */
    827834    public function beforeCreateOrUpdateUser($credentials, $ldapAttributes) {
     835        $this->logger->info("Hook beforeCreateOrUpdateUser executed");
    828836        return true;
    829837    }
     
    836844     */
    837845    public function afterCreateOrUpdateUser($credentials, $adiUser, $wpUser) {
     846        $this->logger->info("Hook afterCreateOrUpdateUser executed, wpUser: '" . is_object($wpUser) . "'");
    838847        return $wpUser;
    839848    }
  • next-active-directory-integration/trunk/classes/Adi/Init.php

    r1861755 r1996343  
    11<?php
    2 if (!defined('ABSPATH')) {
     2if ( ! defined('ABSPATH')) {
    33    die('Access denied.');
    44}
     
    6565                // At a later point we check for ID = 1 (local WordPress admin) but this user can be different from the current user (= another WordPress administrator).
    6666                $currentUser = wp_get_current_user();
    67                 $optionName = NextADInt_Adi_Configuration_Options::EXCLUDE_USERNAMES_FROM_AUTHENTICATION;
     67                $optionName  = NextADInt_Adi_Configuration_Options::EXCLUDE_USERNAMES_FROM_AUTHENTICATION;
    6868                $optionValue = $currentUser->user_login;
    6969
    7070                if (is_multisite()) {
    71                     $this->dc()->getProfileConfigurationRepository()->persistSanitizedValue($profileId, $optionName, $optionValue);
     71                    $this->dc()->getProfileConfigurationRepository()->persistSanitizedValue($profileId, $optionName,
     72                        $optionValue);
    7273                } else {
    7374                    $this->dc()->getBlogConfigurationRepository()->persistSanitizedValue(0, $optionName, $optionValue);
     
    119120
    120121        // load internationalization (i18n)
    121         load_plugin_textdomain('next-active-directory-integration', false, plugin_basename(NEXT_AD_INT_PATH) . '/languages');
     122        load_plugin_textdomain('next-active-directory-integration', false,
     123            plugin_basename(NEXT_AD_INT_PATH) . '/languages');
    122124
    123125        // ADI-354 (dme)
    124126        $configurationService = $this->dc()->getConfiguration();
    125         $enableLogging = $configurationService->getOptionValue(NextADInt_Adi_Configuration_Options::LOGGER_ENABLE_LOGGING);
    126         $customPath = $configurationService->getOptionValue((NextADInt_Adi_Configuration_Options::LOGGER_CUSTOM_PATH));
     127        $enableLogging        = $configurationService->getOptionValue(NextADInt_Adi_Configuration_Options::LOGGER_ENABLE_LOGGING);
     128        $customPath           = $configurationService->getOptionValue((NextADInt_Adi_Configuration_Options::LOGGER_CUSTOM_PATH));
    127129
    128130        NextADInt_Core_Logger::initializeLogger($enableLogging, $customPath);
     
    196198        }
    197199
     200        // ADI-665 register the hooks required during the test authentication process
     201        if ($this->isOnTestAuthenticationPage()) {
     202            $this->dc()->getLoginService()->registerAuthenticationHooks();
     203        }
     204
     205
    198206        $currentUserId = wp_get_current_user()->ID;
    199207
    200         if (!$currentUserId) {
     208        if ( ! $currentUserId) {
    201209            // the current user is not logged in so further hooks must not be processed
    202210            return false;
     
    236244    {
    237245        // only network dashboard views are relevant
    238         if (!$this->isOnNetworkDashboard()) {
     246        if ( ! $this->isOnNetworkDashboard()) {
    239247            return;
    240248        }
     
    267275        // register authentication
    268276        $this->dc()->getLoginService()->register();
     277        $this->dc()->getLoginService()->registerAuthenticationHooks();
    269278        // register custom password validation
    270279        $this->dc()->getPasswordValidationService()->register();
     
    284293
    285294        $this->dc()->getSsoService()->register();
     295        $this->dc()->getSsoService()->registerAuthenticationHooks();
    286296    }
    287297
     
    390400        $r = false;
    391401
    392         $page = $_SERVER['PHP_SELF'];
    393         $required = "wp-login.php";
     402        $page        = $_SERVER['PHP_SELF'];
     403        $required    = "wp-login.php";
    394404        $isOnWpLogin = substr($page, -strlen($required)) == $required;
    395         $isOnXmlRpc = strpos($page, 'xmlrpc.php') !== false;
     405        $isOnXmlRpc  = strpos($page, 'xmlrpc.php') !== false;
    396406
    397407        if ($isOnWpLogin || $isOnXmlRpc) {
     
    403413        return $r;
    404414    }
     415
     416    /**
     417     * Return true if current page is the test authentication page.
     418     */
     419    public function isOnTestAuthenticationPage()
     420    {
     421        return isset($_GET['page']) && $_GET['page'] === 'next_ad_int_test_connection';
     422    }
    405423}
  • next-active-directory-integration/trunk/index.php

    r1986677 r1996343  
    44Plugin URI: https://www.active-directory-wp.com
    55Description: This is the successor of the Active Directory Integration plug-in which allows you to authenticate, authorize, create and update users through Active Directory.
    6 Version: 2.1.5
     6Version: 2.1.7
    77Author: NeosIT GmbH
    88Author URI: http://www.neos-it.de/
  • next-active-directory-integration/trunk/readme.txt

    r1986677 r1996343  
    44Requires at least: 4.0
    55Tested up to: 4.9.8
    6 Stable tag: 2.1.5
     6Stable tag: 2.1.7
    77License: GPLv3
    88
     
    127127For detailed information you can visit the official [GitHub repository of Active Directory Integration 2](https://github.com/NeosIT/active-directory-integration2)
    128128
     129= 2.1.7 =
     130* FIXED: the hooks auth_before_create_or_update_user and auth_after_create_or_update_user were not registered so the SSO authentication always failed silently (ADI-668)
     131
     132= 2.1.6 =
     133* FIXED: custom authentication filters were not registered properly (ADI-665) this will fix SSO related issues
     134* FIXED: test authentication will now properly check for authorization groups again
     135
    129136= 2.1.5 =
    130137* FIXED: replaced all references to the deprecated each-function with foreach (ADI-628)
Note: See TracChangeset for help on using the changeset viewer.