cerpus / php-coreclient by emmachughes

Client for communication with Core
5,444
0
4
Package Data
Maintainer Username: emmachughes
Maintainer Contact: thomass@cerpus.com (Thomas Horn Sivertsen)
Package Create Date: 2021-10-11
Package Last Update: 2022-01-21
Language: PHP
License: GPL-3.0-only
Last Refreshed: 2024-04-12 03:15:16
Package Statistics
Total Downloads: 5,444
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 4
Total Forks: 1
Total Open Issues: 0

Core Client

This is a client that handles requests to Core.

Installation in Laravel

  1. Install the code with composer: composer require cerpus/coreclient
  2. Add the class CoreClientServiceProvider in the list of providers for your site
    1. Normally located in config/app.php in Laravel
    2. Add the code $app->register(\Cerpus\CoreClient\CoreClientServiceProvider::class); in bootstrap/app.php in Lumen
  3. Setup url to Core and Auth, depending on level of security. The package is delivered with default settings that's read from the env file. If default key is not possible, fallback is listed in parethesis
    1. Core

      • CERPUS_CORE_SERVER (CORECLIENT_CORE_SERVER)
      • CERPUS_CORE_KEY (CORECLIENT_CORE_KEY)
      • CERPUS_CORE_SECRET (CORECLIENT_CORE_SECRET)
      • CERPUS_CORE_TOKEN (CORECLIENT_CORE_TOKEN)
      • CERPUS_CORE_TOKEN_SECRET (CORECLIENT_CORE_TOKEN_SECRET)
    2. Auth

      • CERPUS_AUTH_SERVER (CORECLIENT_AUTH_SERVER)
      • CERPUS_AUTH_USER (CORECLIENT_AUTH_USER)
      • CERPUS_AUTH_SECRET (CORECLIENT_AUTH_SECRET)
    3. Adapter

      • CORECLIENT_ADAPTER, default set to CoreAdapter
      • CORECLIENT_SERVICE, default set to Client(no authentication)
  4. To use the client create a new object of type CoreContract or call static facade CoreClient

License

This package is released under the GNU General Public License 3.0. See the LICENSE file for more information.