Skip to content

Commit aa1b291

Browse files
committed
Updating the REAMDE with documentation
1 parent 9199f61 commit aa1b291

File tree

2 files changed

+63
-6
lines changed

2 files changed

+63
-6
lines changed

README.md

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,65 @@ BasicLTI Utilities are a set of utility classes to aid in the development
99
of BasicLTI consumers and providers. They deal with much of the heavy lifting
1010
and make the process more opaque to the developer.
1111

12-
Licensing
12+
13+
How to use:
14+
-----------
15+
Install via Maven:
16+
17+
git clone https://github.com/pfgray/basiclti-util-java.git
18+
cd basiclti-util-java/
19+
mvn clean install
20+
21+
Include in your project's `pom.xml`:
22+
23+
<dependency>
24+
<groupId>org.imsglobal</groupId>
25+
<artifactId>basiclti-util</artifactId>
26+
<version>1.0.0</version>
27+
</dependency>
28+
29+
Examples:
1330
---------
1431

15-
Please see the file called LICENSE source directories.
32+
LTI Producer:
33+
34+
Spring Controller (LTI Producer):
35+
36+
@Lti
37+
@RequestMapping(value = "/lti", method = RequestMethod.POST)
38+
public String ltiEntry(HttpServletRequest request, LtiVerificationResult result) {
39+
if(!result.getSuccess()){
40+
return "error";
41+
} else {
42+
return "success";
43+
}
44+
}
45+
KeyService Implementation:
46+
47+
public class MockKeyService implements LtiKeySecretService {
48+
public String getSecretForKey(String key) {
49+
return "secret";
50+
}
51+
}
52+
53+
Spring Context xml:
54+
55+
<aop:aspectj-autoproxy/>
56+
57+
<bean id="myAspect" class="org.imsglobal.aspect.LtiLaunchVerifier">
58+
<constructor-arg>
59+
<bean class="com.example.MockKeyService"/>
60+
</constructor-arg>
61+
</bean>
62+
63+
How to Contribute:
64+
------------------
65+
1. Fork the repo
66+
2. Add changes
67+
3. Send a pull request with those changes
68+
69+
TODO List:
70+
--------------
1671

72+
- [ ] Write Unit tests for LTI Consumer code
73+
- [ ] Write Unit tests for LTI 2 code

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@
6666
<version>1.7.4</version>
6767
<type>jar</type>
6868
</dependency>
69-
<dependency>
70-
<groupId>cglib</groupId>
71-
<artifactId>cglib</artifactId>
72-
<version>2.2</version>
69+
<dependency>
70+
<groupId>cglib</groupId>
71+
<artifactId>cglib</artifactId>
72+
<version>2.2</version>
7373
</dependency>
7474
<dependency>
7575
<groupId>org.powermock</groupId>

0 commit comments

Comments
 (0)