cyberuslabs/cyberkey

Server side PHP library to integrate your system with Cybeurs Key easily

v0.0.3 2020-02-28 11:51 UTC

This package is not auto-updated.

Last update: 2022-11-19 01:34:02 UTC


README

Ready to use PHP class which heavily simplify process of integration your very own CyberusKey.

Instalation

Use the dependency manager composer to install CyberusKey.

composer require cyberuslabs/cyberkey

Usage

require_once __DIR__ . '/vendor/autoload.php';

$cyberkey = new Cyberuslabs\Cyberkey(
  '[CLIENT_ID]',
  '[SECRET_KEY]',
  '[REDIRECT_URL]'
);

try {
  $result = $cyberkey->authenticate();
  var_dump($result);
  // $result will contain object with all  your profile information.
} catch(Exception $e) {
  echo 'Caught exception: ',  $e->getMessage(); 
}

Methods

// In case you need to change these
$cyberkey->set_public_key('[PUBLIC_KEY]');
$cyberkey->set_api_address('[API_ADDRESS]');