UOC / java-lti-1.3

MIT License
21 stars 11 forks source link

LTI 1.3 & LTI Advantage Java Library

Library implementing a full LTI Advantage tool.

Install

This library depends on two additional libraries:

Install it using maven:

./mvnw install

Documentation

The basic class in the library is edu.uoc.elc.lti.tool.Tool, which defines a Tool. It has the basic methods:

It also has utility methods for getting claims in an agnostic way

Configuration

Configuration of the Tool is made through the classes edu.uoc.elc.lti.tool.Registration, edu.uoc.elc.lti.tool.KeySet, edu.uoc.elc.lti.tool.Key and edu.uoc.elc.lti.tool.Deployment. There you can set the following parameters of the tool:

Key

KeySet

Deployment

Registration

Tool uses LTI 1.3 core interfaces for dealing with requests and JWT generation. The definition of the implementations of these interfaces are in the edu.uoc.elc.lti.tool.ToolBuilders class

Usage

  1. Set your maven installation to work with Github packages, following the Github Docs. Add the following configuration to your maven settings.xml file:

    <servers>
      <server>
        <id>github-uoc-lti</id>
        <username>USERNAME</username>
        <password>GITHUB_TOKEN</password>
      </server>
      <server>
        <id>github-uoc-lti-core</id>
        <username>USERNAME</username>
        <password>GITHUB_TOKEN</password>
      </server>
      <server>
        <id>github-uoc-lti-jwt</id>
        <username>USERNAME</username>
        <password>GITHUB_TOKEN</password>
      </server>
    </servers>
  2. Add the dependency to your pom.xml file:

    <dependency>
      <groupId>edu.uoc.elc.lti</groupId>
      <artifactId>lti-13</artifactId>
      <version>1.0.0</version>
    </dependency>
  3. Add the following repositories to your pom.xml file & verify that the repositories's IDs matches the server's IDs (set at step 1):

    <repositories>
        <repository>
          <id>github-uoc-lti-core</id>
          <name>GitHub UOC Apache Maven Packages</name>
          <url>https://maven.pkg.github.com/uoc/java-lti-1.3-core</url>
        </repository>               
        <repository>
          <id>github-uoc-lti-jwt</id>
          <name>GitHub UOC Apache Maven Packages</name>
          <url>https://maven.pkg.github.com/uoc/java-lti-1.3-jwt</url>
        </repository>               
        <repository>
          <id>github-uoc-lti</id>
          <name>GitHub UOC Apache Maven Packages</name>
          <url>https://maven.pkg.github.com/uoc/java-lti-1.3</url>
        </repository>
    </repositories>

Contributing

Thanks for being interested in this project. The way of contributing is the common for almost all projects:

  1. Fork the project to your account
  2. Implement your changes
  3. Make a pull request

If you need further information contact to xaracil at uoc dot edu