Skip to content

Support library for signing Samsung Knox API access tokens

License

Notifications You must be signed in to change notification settings

marmichalski/knox-token

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knox Token

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

About

Support library for signing Samsung Knox API access tokens

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%