PHP code example of healthrecoverysolutions / knox-token
1. Go to this page and download the library: Download healthrecoverysolutions/knox-token library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
healthrecoverysolutions / knox-token example snippets
use Proget\Samsung\KnoxToken\Certificate;
use Proget\Samsung\KnoxToken\KnoxToken;
$clientIdentifierJwt = KnoxToken::signClientIdentifier('your-client-identifier', Certificate::fromPath('keys.json'));
use Proget\Samsung\KnoxToken\Certificate;
use Proget\Samsung\KnoxToken\KnoxToken;
$accessTokenJwt = KnoxToken::signAccessToken('access-token', Certificate::fromPath('keys.json'));
use Proget\Samsung\KnoxToken\Certificate;
$certificate = Certificate::fromPath('keys.json');
$certificate->publicKey();
$certificate->privateKeyPem();