#IMS Global - LTI™ Utilities
LTI™ Utilities are a set of utility classes to aid in the development of LTI v1.0 consumers and providers. They deal with much of the heavy lifting and make the process more opaque to the developer.
Install via Maven:
git clone https://github.com/pfgray/basiclti-util-java.git
cd basiclti-util-java/
mvn clean install
Include in your project's pom.xml
:
<dependency>
<groupId>org.imsglobal</groupId>
<artifactId>basiclti-util</artifactId>
<version>1.0.0</version>
</dependency>
LTI Producer:
Spring Controller (LTI Producer):
@Lti
@RequestMapping(value = "/lti", method = RequestMethod.POST)
public String ltiEntry(HttpServletRequest request, LtiVerificationResult result) {
if(!result.getSuccess()){
return "error";
} else {
return "success";
}
}
KeyService Implementation:
public class MockKeyService implements LtiKeySecretService {
public String getSecretForKey(String key) {
return "secret";
}
}
Spring Context xml:
<aop:aspectj-autoproxy/>
<bean id="myAspect" class="org.imsglobal.aspect.LtiLaunchVerifier">
<constructor-arg>
<bean class="com.example.MockKeyService"/>
</constructor-arg>
</bean>
- Fork the repo
- Add changes
- Send a pull request with those changes
- Write Unit tests for LTI Consumer code
- Write Unit tests for LTI 2 code
© 2014 IMS Global Learning Consortium, Inc. All Rights Reserved.