Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 2.45 KB

README.md

File metadata and controls

72 lines (53 loc) · 2.45 KB

NP.Lti13Platform

NP.Lti13Platform is a .NET 8 project that provides an implementation of an LTI 1.3 platform. This project is a wrapper for the other LTI 1.3 projects. For specific information regarding any of the specific specs, please see their respective projects.

Features

  • LTI 1.3 Core (Launch)
  • Deep Linking
  • Assignment and Grade Services
  • Name and Role Provisioning Services

Getting Started

  1. Add the nuget package to your project:

  2. Add an implementation of the IDataService interface:

public class DataService: IDataService
{
    ...
}
  1. Add the required services (most configurations are optional, the required configurations are shown):
    *For information regarding configurations, please see the individual projects.
builder.Services
    .AddLti13Platform()
    .WithLti13DataService<DataService>();
  1. Setup the routing for the LTI 1.3 platform endpoints:
app.UseLti13Platform();

IDataService

There is no default IDataService implementation to allow each project to store the data how they see fit.

The IDataService interface is a combination of all data services required for all the specs of the LTI 1.3 platform. Each service can be individually overridden instead of implementing the entire data service in a single service.

builder.Services
    .AddLti13Platform()
-    .WithLti13DataService<DataService>();
+    .WithLti13CoreDataService<CoreDataService>()
+    .WithLti13DeepLinkingDataService<DeepLinkingDataService>()
+    .WithLti13AssignmentGradeDataService<AssignmentGradeDataService>()
+    .WithLti13NameRoleProvisioningDataService<NameRoleProvisioningDataService>();

All of the internal services are transient and therefore the data services may be added at any scope (Transient, Scoped, Singleton).

Defaults

Many of the specs have default implementations that use a static configuration on startup. If you can't configure the services at startup you can add your own implementation of the services.

builder.Services
    .AddLti13Platform()
    .WithLti13DataService<DataService>()
+    .WithLti13TokenConfigService<TokenService>()
+    .WithLti13PlatformService<PlatformService>()
+    .WithLti13DeepLinkingConfigService<DeepLinkingConfigService>()
+    .WithLti13DeepLinkingHandler<DeepLinkingHandler>()
+	 .WithLti13AssignmentGradeConfigService<AssignmentGradeConfigService>()
+    .WithLti13NameRoleProvisioningConfigService<NameRoleProvisioningConfigService>();