2017 © Pedro Peláez
 

wordpress-plugin active-directory-api-wp-integration

Simple plugin for verification of existing WordPress users with api.

image

helsingborg-stad/active-directory-api-wp-integration

Simple plugin for verification of existing WordPress users with api.

  • Monday, May 21, 2018
  • by sebastianthulin
  • Repository
  • 5 Watchers
  • 1 Stars
  • 253 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 42 Versions
  • 9 % Grown

The README.md

Active Directory Integration

Integration with the simple active directory api service (https://github.com/helsingborg-stad/active-directory-api). Simply define AD_INTEGRATION_URL with the url to the base directory of the api. The following functions will be enabled by default:, (*1)

  • Only allow local WordPress users to login (their usernames must match those in active directory)
  • Use the password stored in active-directory for matching WordPress users.
  • Update of users basic data like email, first name and last name on login.

Database modifications

This plugin will alter the index of the user table to require unique usernames. This is not a default behavior for WordPress and may break other plugins related to user management., (*2)

Trigger manual bulkimport

You can trigger a manual bulkimport. This will directly call the bulkimport function in your current call. Profile updates will be sheduled every minute following, until all WordPress users has been updated., (*3)

Import new users / remove old: https://site.dev/wp-admin/?adbulkimport Update registered profiles: https://site.dev/wp-admin/?adbulkprofile Propagate user roles to all sites: https://site.dev/wp-admin/?adbulkpropagate, (*4)

Trigger manual cleaning actions

Cleaning actions to keep WordPress tables clean in some installations that are using bad object cache-engines., (*5)

Remove duplicate users: https://site.dev/wp-admin/?adcleanusers Remove orphan user meta: https://site.dev/wp-admin/?adcleanmeta Remove user capabilitys that are empty: https://site.dev/wp-admin/?adcleancap, (*6)

Options (Define Constants)

  • AD_UPDATE_NAME: Update first and last name.
  • AD_UPDATE_EMAIL: Update email if it not belongs to another user account.
  • AD_UPDATE_META: Update meta according to result (will use ad-keys as meta keys prefixed with below). **
  • AD_META_PREFIX: Prefix for metakeys stored in the database. **
  • AD_SAVE_PASSWORD: Wheter to save the ad-password (true) in WordPress. *
  • AD_RANDOM_PASSWORD: Block random password generator. *
  • AD_USER_DOMAIN: Define a domain that belongs to ad-users (to block password reset). *
  • AD_HP_VALIDATION: Define to false to disable honeypot login protection.
  • AD_NONCE_VALIDATION: Define to false to disable nonce login protection.

Options Bulk Import (Define Constants)

These options imports all users avabile in active directory nightly., (*7)

  • AD_BULK_IMPORT: Turn on or off bulk import (true/false)
  • AD_BULK_IMPORT_USER: User account that can read all items in the ad
  • AD_BULK_IMPORT_PASSWORD: Password to the account name above
  • AD_BULK_IMPORT_ROLE: Default role to assign new users (default to "subscriber")
  • AD_BULK_IMPORT_REASSIGN_USERNAME: Reassign content of deleted users to this username. Will fallback to first user if not set or the user is missing.
  • AD_BULK_IMPORT_PROPAGATE: Propagate users on the whole network of blogs (default to true).

Options Auto Create Users

These options creates a user on the site if it exists in active directory on signon., (*8)

  • AD_AUTOCREATE_USER: Turn on or off auto signup (true/false)
  • AD_AUTOCREATE_ROLE: Default role to assign new users (default to "subscriber"), (*9)

  • Be careful setting these options. All of them are not compatible. For instance: You cannot save the password, and generate a random password. ** Ad update meta should be set in order to enable ad_meta_prefix constant., (*10)

Filters

Filter the meta keys stored in the database., (*11)

add_filter('adApiWpIntegration/profile/metaKey', function($meta_key){
    return $meta_key; 
}); 

Filter the default redirect to page, subscribers may not be affected to this (to homepage as default), (*12)

add_filter('adApiWpIntegration/login/defaultRedirect', function(){
    return home_url();
}); 

Example configuration

 define('AD_INTEGRATION_URL', 'https://internalproductionserver.com/ad-api/');
 define('AD_UPDATE_NAME', true);
 define('AD_UPDATE_EMAIL', true);
 define('AD_SAVE_PASSWORD', false);
 define('AD_RANDOM_PASSWORD', true);
 define('AD_USER_DOMAIN', 'company.com');

 define('AD_BULK_IMPORT', true);
 define('AD_BULK_IMPORT_USER', 'bulkimportaduser');
 define('AD_BULK_IMPORT_PASSWORD', '*********');
 define('AD_BULK_IMPORT_ROLE', 'subscriber');
 define('AD_BULK_IMPORT_REASSIGN_USERNAME', 'administrator');

The Versions

21/05 2018

dev-master

9999999-dev

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

21/05 2018

2.1.15

2.1.15.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

27/04 2018

2.1.14

2.1.14.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

28/03 2018

2.1.13

2.1.13.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

07/03 2018

2.1.12

2.1.12.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

07/03 2018

2.1.11

2.1.11.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

27/02 2018

2.1.10

2.1.10.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

26/02 2018

2.1.9

2.1.9.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

26/02 2018

2.1.8

2.1.8.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

26/02 2018

2.1.7

2.1.7.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

16/01 2018

2.1.6

2.1.6.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

15/01 2018

2.1.5

2.1.5.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

15/01 2018

2.1.4

2.1.4.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

15/01 2018

2.1.3

2.1.3.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

15/01 2018

2.1.2

2.1.2.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

03/01 2018

2.1.1

2.1.1.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

03/01 2018

2.1.0

2.1.0.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

02/01 2018

2.0.15

2.0.15.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

02/01 2018

2.0.14

2.0.14.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

23/10 2017

2.0.13

2.0.13.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

23/10 2017

2.0.12

2.0.12.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

10/10 2017

2.0.11

2.0.11.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

29/09 2017

2.0.10

2.0.10.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

19/09 2017

2.0.9

2.0.9.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

19/09 2017

2.0.8

2.0.8.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

18/09 2017

2.0.7

2.0.7.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

18/09 2017

2.0.6

2.0.6.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

18/09 2017

2.0.5

2.0.5.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

18/09 2017

2.0.4

2.0.4.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

15/09 2017

2.0.3

2.0.3.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

15/09 2017

2.0.2

2.0.2.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

15/09 2017

2.0.1

2.0.1.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

15/09 2017

2.0.0

2.0.0.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

07/09 2017

1.0.9

1.0.9.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

08/05 2017

1.0.8

1.0.8.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

05/05 2017

1.0.7

1.0.7.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

19/04 2017

1.0.6

1.0.6.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

18/04 2017

1.0.5

1.0.5.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

18/04 2017

1.0.4

1.0.4.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

13/04 2017

1.0.3

1.0.3.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

13/04 2017

1.0.2

1.0.2.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin

10/04 2017

1.0.1

1.0.1.0

Simple plugin for verification of existing WordPress users with api.

  Sources   Download

MIT

by Sebastian Thulin