Support library for signing Samsung Knox API access tokens

Installs: 206

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 8

pkg:composer/healthrecoverysolutions/knox-token

0.3.1 2023-08-11 15:05 UTC

This package is not auto-updated.

Last update: 2025-12-28 03:14:36 UTC


README

Support library for signing Samsung Knox API access tokens

Install

composer require healthrecoverysolutions/knox-token

Usage

More info at Knox Cloud API Integration Guide

Sign your Client Identifier

use Proget\Samsung\KnoxToken\Certificate;
use Proget\Samsung\KnoxToken\KnoxToken;

$clientIdentifierJwt = KnoxToken::signClientIdentifier('your-client-identifier', Certificate::fromPath('keys.json'));

Sign your Access Token

use Proget\Samsung\KnoxToken\Certificate;
use Proget\Samsung\KnoxToken\KnoxToken;

$accessTokenJwt = KnoxToken::signAccessToken('access-token', Certificate::fromPath('keys.json'));

Load certificate

use Proget\Samsung\KnoxToken\Certificate;

$certificate = Certificate::fromPath('keys.json');

$certificate->publicKey();
$certificate->privateKeyPem();

License

MIT