PHPackages                             chrispittman/lti1-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. chrispittman/lti1-php

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

chrispittman/lti1-php
=====================

Utility tools for LTI 1.x interactions

1.1.1(6y ago)044MITPHPPHP &gt;5.6.0

Since Jun 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/chrispittman/lti1_php)[ Packagist](https://packagist.org/packages/chrispittman/lti1-php)[ RSS](/packages/chrispittman-lti1-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (7)Used By (0)

lti1\_php
=========

[](#lti1_php)

Composer package for LTI 1.x interactions in PHP

⚠️ **DEPRECATED**: with the impending retirement of LTI 1.0/1.1/1.2, nobody should use this anymore.

Usage example
-------------

[](#usage-example)

Here's a sample Laravel controller which uses this to launch an LTI app.

```
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Chrispittman\Lti1\LTIUtils;
use App;
use Cache;
use Redirect;
use Session;

class LTIController extends Controller
{
    // assumes these routes are present:
    // Route::post('/lti_launch', 'LTIController@postLaunch');
    // Route::get('/lti_redirect', 'LTIController@getRedirect');
    // Route::get('/lti_tool', 'LTIController@getTool');

    public function postLaunch(Request $request) {
        $lti_utils = new LTIUtils();
        if (!$lti_utils->is_basic_lti_request()) {
            App::abort(403,"Not a basic LTI request.");
        }
        $consumer_key = $request->get('oauth_consumer_key');
        $shared_secret = STORED_SHARED_SECRET_HERE;
        if (!$lti_utils->is_valid_oauth_signature($consumer_key, $shared_secret, $request->url())) {
            App::abort(403,"Invalid OAuth signature.");
        }

        $request->session()->put('lti_launch_data', $_POST);

        $uuid = self::gen_uuid();
        Cache::put('lti_launch_data_' . $uuid, $_POST, 5);

        $launch_url = "/lti_redirect?uuid=".$uuid;
        return Redirect::to($launch_url);
    }

    public function getRedirect(Request $request) {
        // * What is this?
        // * Why not just use the data in the session?
        // * Why not just redirect straight to the tool?
        // Sessions are tricky with iframes, which many LMSes put tools inside of:
        // http://www.dr-chuck.com/csev-blog/2013/03/lti-frames-and-cookies-oh-my/
        // ...so we use the cache as a temporary holding area until we have a working session,
        // popping open a new window if needed.
        $uuid = $_REQUEST['uuid'];
        $tool_start_page = "/lti_tool";
        if (Session::has('lti_launch_data')) {
            return Redirect::to('/lti_tool');
        }
        if ($request->has('newwin')) {
            Session::put('lti_launch_data', Cache::get('lti_launch_data_' . $uuid));
            return Redirect::to('/lti_tool');

        }
        return "Click here to load this page.";
    }

    public function getTool(Request $request) {
        return "Here's the first page of the tool.  ".json_encode(Session::get('lti_launch_data'));
    }

    protected static function gen_uuid() {
        return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
            // 32 bits for "time_low"
            mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
            // 16 bits for "time_mid"
            mt_rand( 0, 0xffff ),
            // 16 bits for "time_hi_and_version",
            // four most significant bits holds version number 4
            mt_rand( 0, 0x0fff ) | 0x4000,
            // 16 bits, 8 bits for "clk_seq_hi_res",
            // 8 bits for "clk_seq_low",
            // two most significant bits holds zero and one for variant DCE1.1
            mt_rand( 0, 0x3fff ) | 0x8000,
            // 48 bits for "node"
            mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
        );
    }
}

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~161 days

Recently: every ~201 days

Total

6

Last Release

2437d ago

Major Versions

0.0.2 → 1.0.02017-06-25

PHP version history (2 changes)v0.0.1PHP &gt;5.4.0

1.1PHP &gt;5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6b174016fbf6f2f7428f040a0df2cb27599aec1cdc5d4057869da0b34b8e549?d=identicon)[chrispittman](/maintainers/chrispittman)

---

Top Contributors

[![chrispittman](https://avatars.githubusercontent.com/u/918414?v=4)](https://github.com/chrispittman "chrispittman (14 commits)")

---

Tags

LTI

### Embed Badge

![Health badge](/badges/chrispittman-lti1-php/health.svg)

```
[![Health](https://phpackages.com/badges/chrispittman-lti1-php/health.svg)](https://phpackages.com/packages/chrispittman-lti1-php)
```

###  Alternatives

[symfony/polyfill-php72

Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions

4.8k674.7M31](/packages/symfony-polyfill-php72)[symfony/polyfill-intl-icu

Symfony polyfill for intl's ICU-related data and classes

2.6k251.4M96](/packages/symfony-polyfill-intl-icu)[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.2k64.2M574](/packages/nette-php-generator)[consolidation/site-process

A thin wrapper around the Symfony Process Component that allows applications to use the Site Alias library to specify the target for a remote call.

5345.3M8](/packages/consolidation-site-process)[sycho/flarum-profile-cover

Adds the ability to add a cover image to a profile.

1836.6k](/packages/sycho-flarum-profile-cover)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
