How ltilibrary/ltiadvantagetool works
AdvantageTool is a sample ASP.NET Core LTI 1.3 / LTI Advantage tool. An LMS initiates OIDC login, then launches the tool with an id_token; the tool validates the launch and either dispatches deep-link requests or renders a resource-link experience. From there, the tool demonstrates deep-link responses, AGS line-item and score actions, and AGS results plus NRPS membership reads. Platform registration and tool-signed JWT verification are supporting capabilities. README documents several handlers whose source was not sampled, so their internal wiring is shown only where documented.
Main entry points: Tool.cshtml.cs Launch handler · LineItemsViewComponent.cs AGS and NRPS viewer · AccessTokenService.cs Access-token service · PemHelper.cs PEM key utilities
Components 19
Platform setup
- Platform management
src/AdvantageTool/Pages/Platforms - Platform input model
src/AdvantageTool/Pages/Platforms/PlatformInputModel.cs
Login and launch
- OIDC initiation
src/AdvantageTool/Pages/OidcLogin.cshtml.cs - Launch handler
src/AdvantageTool/Pages/Tool.cshtml.cs
LTI capabilities
- Deep-link response
src/AdvantageTool/Pages/Catalog.cshtml.cs - AGS and NRPS viewer
src/AdvantageTool/Pages/Components/LineItems/LineItemsViewComponent.cs - Line-item view model
src/AdvantageTool/Pages/Components/LineItems/LineItemsModel.cs
Tokens and keys
- Access-token service
src/AdvantageTool/Services/AccessTokenService.cs - Tool JWKS endpoint
src/AdvantageTool/Program.cs - JWKS service
src/AdvantageTool/Services/JwksService.cs - PEM key utilities
src/AdvantageTool/Utility/PemHelper.cs
Persistence
- Launch state
src/AdvantageTool/Data/StateDbContext.cs - Platform and identity data
src/AdvantageTool/Data/ApplicationDbContext.cs
Other components
- Tool administrator
- LMS platform
- AGS services
- NRPS service
- Platform authorization
- Platform token endpoint
Connections 28
- Tool administrator → Platform management: manages platforms
- Platform management → Platform input model: builds configuration
- Platform input model → PEM key utilities: generates keys
- Platform management → Platform and identity data: persists platforms
- LMS platform → OIDC initiation: starts login
- OIDC initiation → Launch state: stores state
- OIDC initiation → Platform authorization: redirects login
- LMS platform → Launch handler: posts launch
- Launch handler → Launch state: checks nonce
- Launch handler → Platform and identity data: loads platform
- Launch handler → LMS platform: fetches platform JWKS
- Launch handler → Deep-link response: dispatches deep link
- Deep-link response → PEM key utilities: signs response
- Deep-link response → LMS platform: posts deep link
- Launch handler → AGS and NRPS viewer: renders LTI data
- AGS and NRPS viewer → Line-item view model: builds view model
- AGS and NRPS viewer → Access-token service: requests token
- Launch handler → Access-token service: requests token
- Access-token service → Platform and identity data: loads credentials
- Access-token service → PEM key utilities: signs client assertion
- Access-token service → Platform token endpoint: exchanges assertion
- AGS and NRPS viewer → AGS services: reads line items and results
- AGS and NRPS viewer → NRPS service: reads memberships
- Launch handler → AGS services: manages line items and scores
- Tool JWKS endpoint → JWKS service: dispatches request
- JWKS service → Platform and identity data: loads public key
- JWKS service → PEM key utilities: converts public key
- LMS platform → Tool JWKS endpoint: fetches tool JWKS