Ltix is an Elixir library for building LTI 1.3 tool applications. It handles the OIDC launch flow, JWT verification, and claim parsing so you can focus on what your tool actually does.
# Platform initiates login - build the redirect
{:ok, %{redirect_uri: url, state: state}} =
Ltix.handle_login(params, launch_url)
# Platform sends the signed JWT - validate and parse
{:ok, context} = Ltix.handle_callback(params, state)
context.claims.roles #=> [%Role{type: :context, name: :instructor}, ...]
context.claims.resource_link #=> %ResourceLink{id: "link-1", title: "Assignment 1"}
context.registration #=> your struct from StorageAdapter.get_registration/2Features
- Two-function launch API -
handle_login/3andhandle_callback/3cover the entire OIDC flow - LTI Advantage - Assignment and Grade Services, Names and Role Provisioning, and Deep Linking
- Storage-agnostic - implement four callbacks in
Ltix.StorageAdapterto plug in any persistence layer - Framework-agnostic - works with Phoenix, bare Plug, or any Elixir web framework
- Structured claims - roles, context, resource links, and service endpoints parsed into typed structs
- Spec-referenced errors - classified as
:invalid,:security, or:unknown, with aspec_refpointing to the relevant spec section - Testing utilities -
Ltix.Testprovides a simulated platform for integration tests without a real LMS
Installation
Add :ltix to your dependencies:
def deps do
[
{:ltix, "~> 0.1"}
]
endDocumentation
- Getting Started
- What is Ltix?
- LTI 1.3 Concepts
- Storage Adapters
- Working with Roles
- Error Handling
- Advantage Services
- Memberships Service
- Grade Service
- Deep Linking
- JWK Management
License
MIT.
See LICENSE for details.