@@ -13,53 +13,56 @@ and make the process more opaque to the developer.
1313How to use:
1414-----------
1515Install 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+ ```
2121Include 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+ ```
2930Examples:
3031---------
3132
3233LTI Producer:
3334
3435Spring 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+ ```
4547KeyService 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
5356Spring 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+ ```
6366How to Contribute:
6467------------------
65681 . Fork the repo
0 commit comments