trustedlogin / trustedlogin-vendor

Plugin to interact with TrustedLogin's encrypted storage infrastructure to redirect support staff into an authenticated session on client installations.
GNU General Public License v3.0
0 stars 1 forks source link

TrustedLogin Vendor Plugin

Plugin to interact with TrustedLogin's encrypted storage infrastructure to redirect support staff into an authenticated session on client installations.

To compile

The repo lacks the /vendor/ directory; you'll need to build first. Here's how:

  1. Change directories to the plugin directory (cd /path/to/directory)
  2. Run composer install --no-dev

Code Standards Installation

  1. Change directories to the plugin directory (cd /path/to/directory)
  2. Run composer install - this will also install the code standards directory
  3. Run ./vendor/bin/phpcs

Local Development Environment

A docker-compose-based local development environment is provided.

In the local development container, the constant DOING_TL_VENDOR_TESTS is set to true, as is WP_DEBUG.

Running PHPUnit In Docker

There is a special phpunit container for running WordPress tests, with WordPress and MySQL configured.

Server To Server HTTP Requests

If the ecommerce app is also running in docker-compose, this WordPress and the "web" service of app should be in "tl-dev" network. This allows you to make an HTTP request to the eCommerce app like this:

$r = wp_remote_get('http://web:80',['sslverify' => false]);

If this doesn't work, make sure a "tl-dev" network exists:

docker network ls

If it does not, create one:

docker network create tl-dev