nozier/nozier-client

Nozier Communication Client

v1.1.3 2020-04-02 09:31 UTC

This package is auto-updated.

Last update: 2020-10-24 08:53:03 UTC


README

Latest version on Packagist Software License Build status Downloads

The Nozier communication client is used for communicating with Nozier. For Joomla!, see nozier/nozier-joomla. For Wordpress, see nozier/nozier-wordpress.

Installation

You can install the package using Composer:

composer require nozier/nozier-client

Requirements

This package requires at least PHP 7.2.

Endpoints

The Nozier application will request the following endpoints on your website. Respond to the specific request with the correct response class. All url's are relative to the root of your website.

Type Method URL Response class
Online check HEAD / -
Fetch GET /nozier/fetch FetchResponse
Software Update POST /nozier/update-software UpdateSoftwareResponse
Core Update POST /nozier/update-core UpdateCoreResponse

Verifying the authenticity of Nozier requests

The Nozier client signs requests based on a token that both clients have, but is never send. The Request class has a method validate which validates the current incoming request. If it throws an exception, your website should refuse the request. Nozier will do the same if your responses are invalid. Make sure the tokens are the same on both Nozier and your website.

Testing

$ composer test

Credits

License

The MIT license. See LICENSE for more information.