-
Notifications
You must be signed in to change notification settings - Fork 16
Migration from 5.x to 6.x
Jonathan VUILLEMIN edited this page Apr 14, 2021
·
5 revisions
You can find below the list of new features offered by version 6.x.
Version 6.x provides new interfaces to implement if you need to customize the way core library works:
- PlatformLaunchValidatorInterface: to customize platform messages launch validation
- ToolLaunchValidatorInterface: to customize tool messages launch validation
- AccessTokenResponseGeneratorInterface: to customize services access token generation
- RequestAccessTokenValidatorInterface: to customize services access token validation
Globally, top level classes of the library and their usage did not change, ensuring the migration to the version 6.x to be straightforward.
But version 6.x introduce some methods signatures changes, as well as classes namespaces fixes, listed below.
- The LtiServiceServerRequestHandlerInterface method
handleServiceRequest()
has been replaced withhandleValidatedServiceRequest()
that now allows to work with the launch validation result (gives access to registration, token, and scopes):
use OAT\Library\Lti1p3Core\Security\OAuth2\Validator\Result\RequestAccessTokenValidationResultInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
interface LtiServiceServerRequestHandlerInterface
{
...
public function handleValidatedServiceRequest(
RequestAccessTokenValidationResultInterface $validationResult,
ServerRequestInterface $request,
array $options = []
): ResponseInterface;
}
-
The PlatformLaunchValidator now returns a LaunchValidationResultInterface instance
-
The ToolLaunchValidator now returns a LaunchValidationResultInterface instance
-
The RequestAccessTokenValidator now returns a RequestAccessTokenValidationResultInterface instance
- moved PlatformLaunchValidator in Platform sub namespace
- moved ToolLaunchValidator in Tool sub namespace