oat-sa / lib-lti1p3-core

PHP library for LTI 1.3 Core implementations as platforms and / or as tools.
GNU General Public License v2.0
33 stars 16 forks source link

Error at OIDC initiation #128

Closed gyszucs closed 3 years ago

gyszucs commented 3 years ago

The following error appears at OIDC initiation:

OIDC initiation failed: OAT\Library\Lti1p3Core\Message\Payload\Builder\MessagePayloadBuilder::buildMessagePayload(): Argument #1 ($keyChain) must be of type OAT\Library\Lti1p3Core\Security\Key\KeyChainInterface, null given, called in /var/www/html/vendor/oat-sa/lib-lti1p3-core/src/Security/Oidc/OidcInitiator.php on line 96

It happens becaue buildMessagePayload definitely expect a key chain object but the given Registration does not contain any tool key chain information.

How about throwing an LtiException before the following line? https://github.com/oat-sa/lib-lti1p3-core/blob/783e156748410fb0eddf21bc9deab60d472cec5e/src/Security/Oidc/OidcInitiator.php#L96

ekkinox commented 3 years ago

Fix released in version 6.2.0.