# Ltix v0.1.0 - Table of Contents Ltix is an Elixir library for building LTI 1.3 applications. ## Pages - [Ltix](readme.md) - About - [What is Ltix?](what-is-ltix.md) - [LTI Advantage Concepts](concepts.md) - [Comparing Elixir LTI Libraries](comparing-lti-libraries.md) - Guides - [Getting Started](getting-started.md) - [Testing with the IMS Reference Implementation](testing-with-ims-ri.md) - [Storage Adapters](storage-adapters.md) - [Working with Roles](working-with-roles.md) - [Custom Role Parsers](custom-role-parsers.md) - [Custom Claim Parsers](custom-claim-parsers.md) - [Error Handling](error-handling.md) - [Advantage Services](advantage-services.md) - [Deep Linking](deep-linking.md) - [Memberships Service](memberships-service.md) - [Grade Service](grade-service.md) - [JWK Management](jwk-management-1.md) - Cookbooks - [Auto-creating Deployments on First Launch](auto-create-deployments.md) - [Testing LTI Launches](testing-lti-launches.md) - [Managing JWKs with Ecto](jwk-management-2.md) - [Building Scores](score-construction.md) - [Syncing Grades in the Background](background-grade-sync.md) - [Using Canvas Grade Extensions](canvas-grade-extensions.md) - [Building Content Items](building-content-items.md) - [Token Caching and Reuse](token-caching-and-reuse.md) ## Modules - [Ltix](Ltix.md): Ltix handles the LTI 1.3 OIDC launch flow for tool applications. It is built around 4 main components - Core - [Ltix.Deployable](Ltix.Deployable.md): Protocol for extracting an `Ltix.Deployment` from a custom struct. - [Ltix.Deployment](Ltix.Deployment.md): A specific installation of a tool on a platform, identified by an immutable `deployment_id` assigned by the platform. - [Ltix.JWK](Ltix.JWK.md): RSA key pair generation and JWKS document building for LTI tool authentication. - [Ltix.LaunchContext](Ltix.LaunchContext.md): Validated output of a successful LTI launch. - [Ltix.Registerable](Ltix.Registerable.md): Protocol for extracting an `Ltix.Registration` from a custom struct. - [Ltix.Registration](Ltix.Registration.md): Everything the tool knows about a registered platform, established out-of-band before any launch occurs. - [Ltix.StorageAdapter](Ltix.StorageAdapter.md): Defines callbacks for looking up registrations, deployments, and managing nonces. - JWT - [Ltix.JWT.KeySet](Ltix.JWT.KeySet.md): Fetches and caches platform public keys for JWT signature verification. - [Ltix.JWT.Token](Ltix.JWT.Token.md): Decodes and validates LTI ID Tokens (JWTs). - [Ltix.JWT.KeySet.Cache](Ltix.JWT.KeySet.Cache.md): Behaviour for caching JWKS (JSON Web Key Sets) fetched from platform endpoints. - [Ltix.JWT.KeySet.CachexCache](Ltix.JWT.KeySet.CachexCache.md): Cachex-backed cache for JWKS key sets. - [Ltix.JWT.KeySet.EtsCache](Ltix.JWT.KeySet.EtsCache.md): Default ETS-backed cache for JWKS key sets. - Launch Claims - [Ltix.LaunchClaims](Ltix.LaunchClaims.md): Structured representation of claims from an LTI launch JWT. - [Ltix.LaunchClaims.AgsEndpoint](Ltix.LaunchClaims.AgsEndpoint.md): Assignment and Grade Services (AGS) endpoint claim. - [Ltix.LaunchClaims.Context](Ltix.LaunchClaims.Context.md): The context (e.g. course or section) in which the launch occurs. - [Ltix.LaunchClaims.DeepLinkingSettings](Ltix.LaunchClaims.DeepLinkingSettings.md): Platform preferences for a Deep Linking content selection. - [Ltix.LaunchClaims.LaunchPresentation](Ltix.LaunchClaims.LaunchPresentation.md): How the platform expects the tool to be presented. - [Ltix.LaunchClaims.Lis](Ltix.LaunchClaims.Lis.md): SIS (Student Information System) integration identifiers from LIS. - [Ltix.LaunchClaims.MembershipsEndpoint](Ltix.LaunchClaims.MembershipsEndpoint.md): Memberships service endpoint claim. - [Ltix.LaunchClaims.ResourceLink](Ltix.LaunchClaims.ResourceLink.md): A placement of an LTI resource link within a context. - [Ltix.LaunchClaims.Role](Ltix.LaunchClaims.Role.md): A parsed LTI role with type, name, and optional sub-role. - [Ltix.LaunchClaims.ToolPlatform](Ltix.LaunchClaims.ToolPlatform.md): Information about the platform instance that initiated the launch. - [Ltix.LaunchClaims.Role.LIS](Ltix.LaunchClaims.Role.LIS.md): LIS (Learning Information Services) role vocabulary parser. - [Ltix.LaunchClaims.Role.Parser](Ltix.LaunchClaims.Role.Parser.md): Defines a behaviour for parsing role URIs into `%Role{}` structs. - Deep Linking - [Ltix.DeepLinking](Ltix.DeepLinking.md): Package content items into a signed response JWT for the platform. - [Ltix.DeepLinking.ContentItem](Ltix.DeepLinking.ContentItem.md): Protocol for serializing content items in Deep Linking responses. - [Ltix.DeepLinking.Response](Ltix.DeepLinking.Response.md): Signed JWT and return URL from a Deep Linking response. - [Ltix.DeepLinking.ContentItem.File](Ltix.DeepLinking.ContentItem.File.md): A file content item for Deep Linking responses. - [Ltix.DeepLinking.ContentItem.HtmlFragment](Ltix.DeepLinking.ContentItem.HtmlFragment.md): An HTML fragment content item for Deep Linking responses. - [Ltix.DeepLinking.ContentItem.Image](Ltix.DeepLinking.ContentItem.Image.md): An image content item for Deep Linking responses. - [Ltix.DeepLinking.ContentItem.Link](Ltix.DeepLinking.ContentItem.Link.md): A URL link content item for Deep Linking responses. - [Ltix.DeepLinking.ContentItem.LtiResourceLink](Ltix.DeepLinking.ContentItem.LtiResourceLink.md): An LTI resource link content item for Deep Linking responses. - Advantage Services - [Ltix.AdvantageService](Ltix.AdvantageService.md): Behaviour for LTI Advantage service modules. - [Ltix.OAuth](Ltix.OAuth.md): OAuth 2.0 client credentials authentication for LTI Advantage services. - [Ltix.Pagination](Ltix.Pagination.md): Lazy paginated fetching for LTI Advantage endpoints. - [Ltix.OAuth.AccessToken](Ltix.OAuth.AccessToken.md): OAuth 2.0 access token response. - [Ltix.OAuth.Client](Ltix.OAuth.Client.md): Authenticated OAuth session for LTI Advantage service calls. - Memberships Service - [Ltix.MembershipsService](Ltix.MembershipsService.md): Query context membership (roster) from a platform using the [Names and Roles Provisioning Service (NRPS) v2.0](https://www.imsglobal.org/spec/lti-nrps/v2p0/). - [Ltix.MembershipsService.Member](Ltix.MembershipsService.Member.md): A single member in a roster response from the memberships service. - [Ltix.MembershipsService.MembershipContainer](Ltix.MembershipsService.MembershipContainer.md): A roster response from the memberships service. - Grade Service - [Ltix.GradeService](Ltix.GradeService.md): Manage line items, post scores, and read results from a platform's gradebook using the [Assignment and Grade Services (AGS) v2.0](https://www.imsglobal.org/spec/lti-ags/v2p0/). - [Ltix.GradeService.LineItem](Ltix.GradeService.LineItem.md): A line item (gradebook column) in the platform's gradebook. - [Ltix.GradeService.Result](Ltix.GradeService.Result.md): A result record from the platform's gradebook. - [Ltix.GradeService.Score](Ltix.GradeService.Score.md): A score to post to the platform's gradebook. - Errors - [Ltix.Errors](Ltix.Errors.md): Structured error types for LTI 1.3 validation. - [Ltix.Errors.Invalid](Ltix.Errors.Invalid.md): Error class for spec-violating input data. - [Ltix.Errors.Security](Ltix.Errors.Security.md): Error class for security framework violations. - [Ltix.Errors.Unknown](Ltix.Errors.Unknown.md): Catch-all error class for unexpected errors. - Testing - [Ltix.Test](Ltix.Test.md): Helpers for testing applications that use Ltix. - [Ltix.Test.Platform](Ltix.Test.Platform.md): A simulated LTI platform for testing. - [Ltix.Test.StorageAdapter](Ltix.Test.StorageAdapter.md): In-memory `StorageAdapter` for tests. - Exceptions - [Ltix.Errors.Invalid.ContentItemTypeNotAccepted](Ltix.Errors.Invalid.ContentItemTypeNotAccepted.md): Content item type not in the platform's accept_types list. - [Ltix.Errors.Invalid.ContentItemsExceedLimit](Ltix.Errors.Invalid.ContentItemsExceedLimit.md): Multiple content items returned when the platform only accepts one. - [Ltix.Errors.Invalid.CoupledLineItem](Ltix.Errors.Invalid.CoupledLineItem.md): Attempted to delete the platform-coupled line item without `force: true`. - [Ltix.Errors.Invalid.DeploymentNotFound](Ltix.Errors.Invalid.DeploymentNotFound.md): Unknown deployment_id [Core §3.1.3; Core §5.3.3]. - [Ltix.Errors.Invalid.InvalidClaim](Ltix.Errors.Invalid.InvalidClaim.md): Claim present but wrong value or format. - [Ltix.Errors.Invalid.InvalidContentItem](Ltix.Errors.Invalid.InvalidContentItem.md): Content item field missing or invalid. - [Ltix.Errors.Invalid.InvalidEndpoint](Ltix.Errors.Invalid.InvalidEndpoint.md): Wrong endpoint struct passed to an Advantage service. - [Ltix.Errors.Invalid.InvalidJson](Ltix.Errors.Invalid.InvalidJson.md): Malformed JSON or JWT structure [Cert §6.1.1]. - [Ltix.Errors.Invalid.InvalidMessageType](Ltix.Errors.Invalid.InvalidMessageType.md): build_response called on a non-deep-linking launch context. - [Ltix.Errors.Invalid.LineItemNotAccepted](Ltix.Errors.Invalid.LineItemNotAccepted.md): Content item includes a line_item but the platform does not accept line items. - [Ltix.Errors.Invalid.MalformedResponse](Ltix.Errors.Invalid.MalformedResponse.md): Service returned an unparseable response body. - [Ltix.Errors.Invalid.MissingClaim](Ltix.Errors.Invalid.MissingClaim.md): Missing required LTI claim. - [Ltix.Errors.Invalid.MissingParameter](Ltix.Errors.Invalid.MissingParameter.md): Missing OIDC login parameter [Sec §5.1.1.1]. - [Ltix.Errors.Invalid.RegistrationNotFound](Ltix.Errors.Invalid.RegistrationNotFound.md): Unknown issuer/client_id combination [Sec §5.1.1.1]. - [Ltix.Errors.Invalid.RosterTooLarge](Ltix.Errors.Invalid.RosterTooLarge.md): Roster exceeds the max_members safety limit. - [Ltix.Errors.Invalid.ScopeMismatch](Ltix.Errors.Invalid.ScopeMismatch.md): Client lacks the required OAuth scope. - [Ltix.Errors.Invalid.ServiceNotAvailable](Ltix.Errors.Invalid.ServiceNotAvailable.md): Service not available in launch claims. - [Ltix.Errors.Invalid.TokenRequestFailed](Ltix.Errors.Invalid.TokenRequestFailed.md): OAuth token request failed. - [Ltix.Errors.Security.AccessDenied](Ltix.Errors.Security.AccessDenied.md): Platform denied access to a service request. - [Ltix.Errors.Security.AccessTokenExpired](Ltix.Errors.Security.AccessTokenExpired.md): OAuth access token has expired. - [Ltix.Errors.Security.AlgorithmNotAllowed](Ltix.Errors.Security.AlgorithmNotAllowed.md): JWT alg is not RS256 [Sec §5.1.3 step 6; Sec §6.1]. - [Ltix.Errors.Security.AudienceMismatch](Ltix.Errors.Security.AudienceMismatch.md): Tool's client_id not in JWT aud [Sec §5.1.3 step 3]. - [Ltix.Errors.Security.AuthenticationFailed](Ltix.Errors.Security.AuthenticationFailed.md): Platform returned an error instead of an id_token [Sec §5.1.1.5]. - [Ltix.Errors.Security.IssuerMismatch](Ltix.Errors.Security.IssuerMismatch.md): JWT iss doesn't match registration [Sec §5.1.3 step 2]. - [Ltix.Errors.Security.KidMissing](Ltix.Errors.Security.KidMissing.md): No kid in JWT header [Cert §6.1.1]. - [Ltix.Errors.Security.KidNotFound](Ltix.Errors.Security.KidNotFound.md): kid not found in JWKS [Cert §6.1.1]. - [Ltix.Errors.Security.NonceMissing](Ltix.Errors.Security.NonceMissing.md): No nonce claim in JWT [Sec §5.1.3 step 9]. - [Ltix.Errors.Security.NonceNotFound](Ltix.Errors.Security.NonceNotFound.md): Nonce not issued by this tool [Sec §5.1.3 step 9]. - [Ltix.Errors.Security.NonceReused](Ltix.Errors.Security.NonceReused.md): Nonce previously seen — replay attack [Sec §5.1.3 step 9]. - [Ltix.Errors.Security.SignatureInvalid](Ltix.Errors.Security.SignatureInvalid.md): JWT signature verification failed [Sec §5.1.3 step 1]. - [Ltix.Errors.Security.StateMismatch](Ltix.Errors.Security.StateMismatch.md): CSRF state doesn't match [Sec §7.3.1]. - [Ltix.Errors.Security.TokenExpired](Ltix.Errors.Security.TokenExpired.md): Token exp claim is in the past [Sec §5.1.3 step 7]. - [Ltix.Errors.Unknown.TransportError](Ltix.Errors.Unknown.TransportError.md): HTTP or connection error from a platform endpoint. - [Ltix.Errors.Unknown.Unknown](Ltix.Errors.Unknown.Unknown.md): Generic unexpected error.