@@ -62,8 +62,8 @@ To generate a JWT the following values are required:
62
62
63
63
| Variable Name | Description |
64
64
|-----------------------------------|--------------------------------|
65
- | API_PRIVATE_KEY | Private key of your API key that is used to sign the JWTs. |
66
- | API_KEY_ID | ID of your API key. A unique string value that identifies your account in the Virgil Cloud. |
65
+ | APP_KEY | Private key of your API key that is used to sign the JWTs. |
66
+ | APP_KEY_ID | ID of your API key. A unique string value that identifies your account in the Virgil Cloud. |
67
67
| APP_ID | ID of your Virgil Application. |
68
68
69
69
### Add Virgil Credentials to the .env
@@ -119,7 +119,7 @@ Response:
119
119
To generate JWT, you need to use the ` JwtGenerator ` class from the SDK.
120
120
121
121
``` php
122
- $privateKeyStr = $_ENV['API_PRIVATE_KEY '];
122
+ $privateKeyStr = $_ENV['APP_KEY '];
123
123
$apiKeyData = base64_decode($privateKeyStr);
124
124
125
125
$crypto = new VirgilCrypto();
@@ -128,7 +128,7 @@ $privateKey = $crypto->importPrivateKey($apiKeyData);
128
128
$accessTokenSigner = new VirgilAccessTokenSigner();
129
129
130
130
$appId = $_ENV['APP_ID'];
131
- $apiKeyId = $_ENV['API_KEY_ID '];
131
+ $apiKeyId = $_ENV['APP_KEY_ID '];
132
132
$ttl = 3600;
133
133
134
134
$jwtGenerator = new JwtGenerator($privateKey, $apiKeyId, $accessTokenSigner, $appId, $ttl);
0 commit comments