Skip to content

Commit 4624260

Browse files
committed
touching up readme
1 parent aa1b291 commit 4624260

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

README.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,53 +13,56 @@ and make the process more opaque to the developer.
1313
How to use:
1414
-----------
1515
Install via Maven:
16-
16+
```bash
1717
git clone https://github.com/pfgray/basiclti-util-java.git
1818
cd basiclti-util-java/
1919
mvn clean install
20-
20+
```
2121
Include in your project's `pom.xml`:
2222

23+
```xml
2324
<dependency>
2425
<groupId>org.imsglobal</groupId>
2526
<artifactId>basiclti-util</artifactId>
2627
<version>1.0.0</version>
2728
</dependency>
28-
29+
```
2930
Examples:
3031
---------
3132

3233
LTI Producer:
3334

3435
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-
}
36+
```java
37+
@Lti
38+
@RequestMapping(value = "/lti", method = RequestMethod.POST)
39+
public String ltiEntry(HttpServletRequest request, LtiVerificationResult result) {
40+
if(!result.getSuccess()){
41+
return "error";
42+
} else {
43+
return "success";
4444
}
45+
}
46+
```
4547
KeyService Implementation:
46-
47-
public class MockKeyService implements LtiKeySecretService {
48-
public String getSecretForKey(String key) {
49-
return "secret";
50-
}
48+
```java
49+
public class MockKeyService implements LtiKeySecretService {
50+
public String getSecretForKey(String key) {
51+
return "secret";
5152
}
53+
}
54+
```
5255

5356
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-
57+
```xml
58+
<aop:aspectj-autoproxy/>
59+
60+
<bean id="myAspect" class="org.imsglobal.aspect.LtiLaunchVerifier">
61+
<constructor-arg>
62+
<bean class="com.example.MockKeyService"/>
63+
</constructor-arg>
64+
</bean>
65+
```
6366
How to Contribute:
6467
------------------
6568
1. Fork the repo

0 commit comments

Comments
 (0)