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
Trying to get the example apps up and running, example isn't working because a file is missing (/example/keys.php) - calls to example/platform/return.php result in following error:
Warning: require_once(../keys.php): failed to open stream: No such file or directory in /srv/app/example/platform/return.php on line 2
Fatal error: require_once(): Failed opening required '../keys.php' (include_path='.:/usr/local/lib/php') in /srv/app/example/platform/return.php on line 2
(this is on a local machine after invoking docker-compose up --build
Is this a file that was meant to be created by the end user or is it just missing?
Creating example/keys.php and either creating a variable called $privateKey that does not contain a valid key (e.g. $privateKey = "blahblah";) or omitting that variable entirely will cause an error:
Warning: openssl_sign(): supplied key param cannot be coerced into a private key in /srv/app/lti/jwt/src/JWT.php on line 199
Fatal error: Uncaught DomainException: OpenSSL unable to sign data in /srv/app/lti/jwt/src/JWT.php:201 Stack trace: #0 /srv/app/lti/jwt/src/JWT.php(170): Firebase\JWT\JWT::sign('eyJ0eXAiOiJKV1Q...', 'blahblah', 'RS256') #1 /srv/app/example/platform/return.php(88): Firebase\JWT\JWT::encode(Array, 'blahblah', 'RS256', 'C_nvQUsUmo04et4...') #2 {main} thrown in /srv/app/lti/jwt/src/JWT.php on line 201 alternatively ... Firebase\JWT\JWT::encode(Array, NULL, 'RS256', ....
If the created keys.php does provide a valid key then the form POSTs to /example/platform/launch.php incorrectly (running via docker it attempts to post to http://localhost:9001/example/platform/launch.php rather than http://localhost:9001/example/launch.php) - if the form is corrected to action="../launch.php" it still doesn't work if $_REQUEST['state'] is null (this is probably fine for an example app tho)
The text was updated successfully, but these errors were encountered:
hmm, looks like the standard example is a bit out of date, i should probably remove it as it isn't as helpful as the other example. Have you tried the game_example launch, you may have better luck with that one
snake
pushed a commit
to snake/lti-1-3-php-library
that referenced
this issue
Jan 19, 2022
Trying to get the example apps up and running, example isn't working because a file is missing (/example/keys.php) - calls to example/platform/return.php result in following error:
(this is on a local machine after invoking
docker-compose up --build
Is this a file that was meant to be created by the end user or is it just missing?
Creating example/keys.php and either creating a variable called
$privateKey
that does not contain a valid key (e.g.$privateKey = "blahblah";
) or omitting that variable entirely will cause an error:If the created keys.php does provide a valid key then the form POSTs to
/example/platform/launch.php
incorrectly (running via docker it attempts to post to http://localhost:9001/example/platform/launch.php rather than http://localhost:9001/example/launch.php) - if the form is corrected toaction="../launch.php"
it still doesn't work if$_REQUEST['state']
is null (this is probably fine for an example app tho)The text was updated successfully, but these errors were encountered: