1. Go to this page and download the library: Download thamtech/yii2-jws 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/ */
thamtech / yii2-jws example snippets
return [
'components' => [
'jwsManager' => [
'class' => 'thamtech\jws\components\JwsManager',
'pubkey' => '@app/config/keys/jws/public.pem',
'pvtkey' => '@app/config/keys/jws/private.pem',
// The settings below are optional. Defaults will be used if not set here.
//'encoder' => 'Namshi\JOSE\Base64\Base64UrlSafeEncoder',
//'exp' => '1 hour',
//'alg' => 'RS256',
//'jwsClass' => 'Namshi\JOSE\SimpleJWS',
],
]
]