diff --git a/bbb-lti/grails-app/conf/lti.properties b/bbb-lti/grails-app/conf/lti.properties index 5f2067e6b96b987aa3f3ea8fc36e9f9f9a6193b8..4e8c2ddc289f67ea62f26dd571ca7ed277b20bf8 100644 --- a/bbb-lti/grails-app/conf/lti.properties +++ b/bbb-lti/grails-app/conf/lti.properties @@ -28,7 +28,7 @@ bigbluebuttonSalt=bbb_salt # LTI basic information #---------------------------------------------------- # This URL is where the LTI plugin is accessible. It can be a different server than the BigBluebutton one -ltiEndPoint=localhost +ltiEndPoint=http://localhost/lti/tool # The list of consumers allowed to access this lti service. # Format: {consumerId1:sharedSecret1} ltiConsumers=bbb:lti_secret diff --git a/bbb-lti/grails-app/controllers/ToolController.groovy b/bbb-lti/grails-app/controllers/ToolController.groovy index f8d93c3bd033e6400ea5ded6dacbd186bc04e31d..08e96afa91737e9744d3790a4818f6d134d5720e 100644 --- a/bbb-lti/grails-app/controllers/ToolController.groovy +++ b/bbb-lti/grails-app/controllers/ToolController.groovy @@ -59,7 +59,7 @@ class ToolController { def consumer = ltiService.getConsumer(params.get(Parameter.CONSUMER_ID)) if (consumer != null) { log.debug "Found consumer with key " + consumer.get("key") //+ " and sharedSecret " + consumer.get("secret") - if (checkValidSignature(params.get(REQUEST_METHOD), ltiService.retrieveBasicLtiEndpoint(request.isSecure()?"https":"http"), consumer.get("secret"), sanitizedParams, params.get(Parameter.OAUTH_SIGNATURE))) { + if (checkValidSignature(params.get(REQUEST_METHOD), ltiService.endPoint, consumer.get("secret"), sanitizedParams, params.get(Parameter.OAUTH_SIGNATURE))) { log.debug "The message has a valid signature." if( !"extended".equals(ltiService.mode) ) { @@ -359,10 +359,8 @@ class ToolController { ' http://www.imsglobal.org/xsd/imslticp_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticp_v1p0.xsd">' + ' <blti:title>ePortfolio</blti:title>' + ' <blti:description>Single Sign On into BigBlueButton</blti:description>' + - ' <blti:launch_url>' + ltiService.retrieveBasicLtiEndpoint("http") + '</blti:launch_url>' + - ' <blti:secure_launch_url>' + ltiService.retrieveBasicLtiEndpoint("https") + '</blti:secure_launch_url>' + - ' <blti:icon>' + ltiService.retrieveEndpoint("http") + 'images/icon.ico</blti:icon>' + - ' <blti:secure_icon>' + ltiService.retrieveEndpoint("http") + 'images/icon.ico</blti:secure_icon>' + + ' <blti:launch_url>' + ltiService.retrieveBasicLtiEndpoint() + '</blti:launch_url>' + + ' <blti:icon>' + ltiService.retrieveIconEndpoint() + '</blti:icon>' + ' <blti:vendor>' + ' <lticp:code>BBB</lticp:code>' + ' <lticp:name>BigBlueButton</lticp:name>' + diff --git a/bbb-lti/grails-app/services/LtiService.groovy b/bbb-lti/grails-app/services/LtiService.groovy index 9947043126885e88ffc1cead181bc1f0f8294a73..243d5609670850856938efe96ed8b72ed20939f1 100644 --- a/bbb-lti/grails-app/services/LtiService.groovy +++ b/bbb-lti/grails-app/services/LtiService.groovy @@ -26,30 +26,20 @@ class LtiService { boolean transactional = false - //def endPoint = "http://localhost/lti/tool.xml" - def endPoint = "localhost" - def basicLtiEndpoint = "tool.xml" + def endPoint = "http://localhost/lti/tool" def consumers = "demo:welcome" def mode = "simple" Map<String, String> consumerMap - def retrieveEndpoint() { - return retrieveEndpoint("http") + def retrieveIconEndpoint() { + return endPoint.replaceFirst("tool", "images/icon.ico") } - def retrieveEndpoint(protocol) { - return protocol + "://" + endPoint + "/lti/" - } - def retrieveBasicLtiEndpoint() { - return retrieveBasicLtiEndpoint("http") + return endPoint } - def retrieveBasicLtiEndpoint(protocol) { - return protocol + "://" + endPoint + "/lti/" + basicLtiEndpoint - } - private Map<String, String> getConsumer(consumerId) { Map<String, String> consumer = null diff --git a/bigbluebutton-config/bin/bbb-conf b/bigbluebutton-config/bin/bbb-conf index 640ba1a231fb3072f8252157a87df4ac7019b006..69ada938b770566e11e4ab00913639768e871a2f 100755 --- a/bigbluebutton-config/bin/bbb-conf +++ b/bigbluebutton-config/bin/bbb-conf @@ -519,7 +519,7 @@ while [ $# -gt 0 ]; do echo " Customer: $CUSTOMER" echo " Secret: $SECRET" echo - ICON_URL=$( echo $LTI_URL | sed 's/tool.xml/images\/icon.ico/') + ICON_URL=$( echo $LTI_URL | sed 's/tool/images\/icon.ico/') echo " Icon URL: $ICON_URL" echo echo