You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've configured config file exactly it shown in Readme.md file.
And when I use this command php ./examples/exAuthGetAccessToken.php
It gave me this error PHP Warning: openssl_pkey_export(): cannot get key from parameter 1 in D:\htdocs\box-jwt-php\src\Auth\BoxJWTAuth.php on line 44 PHP Warning: openssl_sign(): supplied key param cannot be coerced into a private key in D:\htdocs\box-jwt-php\vendor\firebase\php-jwt\src\JWT.php on line 199 PHP Fatal error: Uncaught DomainException: OpenSSL unable to sign data in D:\htdocs\box-jwt-php\vendor\firebase\php-jwt\src\JWT.php:201 Stack trace: #0 D:\htdocs\box-jwt-php\vendor\firebase\php-jwt\src\JWT.php(170): Firebase\JWT\JWT::sign('eyJ0eXAiOiJKV1Q...', NULL, 'RS256') #1 D:\htdocs\box-jwt-php\src\Auth\BoxJWTAuth.php(71): Firebase\JWT\JWT::encode(Array, NULL, 'RS256', 'l8o5fxoo') #2 D:\htdocs\box-jwt-php\src\Auth\BoxJWTAuth.php(95): Box\Auth\BoxJWTAuth->constructJwt('23527187', 'enterprise') #3 D:\htdocs\box-jwt-php\examples\exAuthGetAccessToken.php(17): Box\Auth\BoxJWTAuth->adminToken() #4 {main} thrown in D:\htdocs\box-jwt-php\vendor\firebase\php-jwt\src\JWT.php on line 201
What I'm doing wrong?
The text was updated successfully, but these errors were encountered:
This is super old, but I also ran into the same issue. The fix was to copy the box.config.php file from the project root to the examples folder (update the path to the cert if needed).
I have a PR that has the example scripts use the project root config file at #21
I've configured config file exactly it shown in Readme.md file.
And when I use this command
php ./examples/exAuthGetAccessToken.php
It gave me this error
PHP Warning: openssl_pkey_export(): cannot get key from parameter 1 in D:\htdocs\box-jwt-php\src\Auth\BoxJWTAuth.php on line 44 PHP Warning: openssl_sign(): supplied key param cannot be coerced into a private key in D:\htdocs\box-jwt-php\vendor\firebase\php-jwt\src\JWT.php on line 199 PHP Fatal error: Uncaught DomainException: OpenSSL unable to sign data in D:\htdocs\box-jwt-php\vendor\firebase\php-jwt\src\JWT.php:201 Stack trace: #0 D:\htdocs\box-jwt-php\vendor\firebase\php-jwt\src\JWT.php(170): Firebase\JWT\JWT::sign('eyJ0eXAiOiJKV1Q...', NULL, 'RS256') #1 D:\htdocs\box-jwt-php\src\Auth\BoxJWTAuth.php(71): Firebase\JWT\JWT::encode(Array, NULL, 'RS256', 'l8o5fxoo') #2 D:\htdocs\box-jwt-php\src\Auth\BoxJWTAuth.php(95): Box\Auth\BoxJWTAuth->constructJwt('23527187', 'enterprise') #3 D:\htdocs\box-jwt-php\examples\exAuthGetAccessToken.php(17): Box\Auth\BoxJWTAuth->adminToken() #4 {main} thrown in D:\htdocs\box-jwt-php\vendor\firebase\php-jwt\src\JWT.php on line 201
What I'm doing wrong?
The text was updated successfully, but these errors were encountered: