proget-hq/knox-token

Support library for signing Samsung Knox API access tokens

Maintainers

Package info

github.com/proget-hq/knox-token

pkg:composer/proget-hq/knox-token

Statistics

Installs: 1 377 931

Dependents: 0

Suggesters: 0

Stars: 9

Open Issues: 2

0.4.0 2024-03-06 13:44 UTC

This package is auto-updated.

Last update: 2026-03-06 23:04:52 UTC


README

Support library for signing Samsung Knox API access tokens

Install

composer require proget-hq/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