packbackbooks/lti-1p3-tool 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

packbackbooks/lti-1p3-tool

Composer 安装命令:

composer require packbackbooks/lti-1p3-tool

包简介

A library used for building IMS-certified LTI 1.3 tool providers in PHP.

关键字:

README 文档

README

Test status Coverage Status

A library used for building IMS-certified LTI 1.3 tool providers in PHP.

This library allows a tool provider (your app) to receive LTI launches from a tool consumer (i.e. LMS). It validates LTI launches and lets an application interact with services like the Names Roles Provisioning Service (to fetch a roster for an LMS course) and Assignment Grades Service (to update grades for students in a course in the LMS).

This library was forked from IMSGlobal/lti-1-3-php-library, initially created by @MartinLenord. Packback found the library immensely helpful and extended it over the years. It has been rewritten by Packback to bring it into compliance with the standards set out by the PHP-FIG and the IMS LTI 1.3 Certification process. Packback actively uses and maintains this library.

Installation

Run:

composer require packbackbooks/lti-1p3-tool

In your code, you will now be able to use classes in the Packback\Lti1p3 namespace to access the library.

Configure JWT

Add the following when bootstrapping your app.

Firebase\JWT\JWT::$leeway = 5;

Implement Data Storage Interfaces

This library uses three methods for storing and accessing data: cache, cookie, and database. All three must be implemented in order for the library to work. You may create your own custom implementations so long as they adhere to the following interfaces:

  • Packback\Lti1p3\Interfaces\ICache
  • Packback\Lti1p3\Interfaces\ICookie
  • Packback\Lti1p3\Interfaces\IDatabase or optionally Packback\Lti1p3\Interfaces\IMigrationDatabase

View the Laravel Implementation Guide to see examples (or copy/paste the code outright).

Create a JWKS endpoint

A JWKS (JSON Web Key Set) endpoint can be generated for either an individual registration or from an array of KIDs and private keys.

use Packback\Lti1p3\JwksEndpoint;

// From issuer
JwksEndpoint::fromIssuer($database, 'http://example.com')->getPublicJwks();
// From registration
JwksEndpoint::fromRegistration($registration)->getPublicJwks();
// From array
JwksEndpoint::new(['a_unique_KID' => file_get_contents('/path/to/private/key.pem')])->getPublicJwks();

Documentation

The wiki provides more detailed information about how to use this library, including a Laravel Implementation Guide.

Contributing

For improvements, suggestions or bug fixes, make a pull request or an issue. Before opening a pull request, add automated tests for your changes, ensure that all tests pass, and any linting errors are fixed.

Testing

Automated tests can be run using the command:

composer test

Linting can be run using

# Display linting errors
composer lint
# Automatically fix linting errors
composer lint-fix

packbackbooks/lti-1p3-tool 适用场景与选型建议

packbackbooks/lti-1p3-tool 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 485.58k 次下载、GitHub Stars 达 53, 最近一次更新时间为 2021 年 01 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「LTI」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 packbackbooks/lti-1p3-tool 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 packbackbooks/lti-1p3-tool 我们能提供哪些服务?
定制开发 / 二次开发

基于 packbackbooks/lti-1p3-tool 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 485.58k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 53
  • 点击次数: 22
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 53
  • Watchers: 5
  • Forks: 107
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2021-01-13