Giter Site home page Giter Site logo

slack-lti-commands's Introduction

slack-lti-commands

Slack commands for managing LTI provided apps

Uses the great LTI Provider library from Stephen Vickers (http://www.spvsoftwareproducts.com/java/lti_tool_provider/)

Available commands

Help

Displays help

/lti help

List

List installed consumers

/lti list

Add

Add a new consumer

/lti add alias key secret launch_url description

Example

To add tsugi-java-servlet (https://github.com/tsugiproject/tsugi-java-servlet) simply type

/lti add tsugi-java 12345 secret http://localhost:8080/tsugi-servlet/hello Tsugi Java Servlet

Launch

Launches a consumer

/lti launch alias

Example

To launch tsugi-java-servlet (https://github.com/tsugiproject/tsugi-java-servlet) added as before

/lti launch tsugi-java

Install

Database

  1. Create Database

    CREATE DATABASE slackLti DEFAULT CHARACTER SET utf8;
    GRANT ALL ON slackLti.* TO 'slackLti'@'localhost' IDENTIFIED BY 'slackLti';
    GRANT ALL ON slackLti.* TO 'slackLti'@'127.0.0.1' IDENTIFIED BY 'slackLti';
    

LTI library

  1. Download library from http://www.spvsoftwareproducts.com/java/lti_tool_provider/

  2. Add to your maven repo. Assuming the library is in /Users/xavi/Downloads/LtiToolProvider-1.1.01/LtiToolProvider-1.1.01.jar:

     mvn install:install-file -Dfile=/Users/xavi/Downloads/LtiToolProvider-1.1.01/LtiToolProvider-1.1.01.jar \
     -DgroupId=org.oscelot \ 
     -DartifactId=lti-tool-provider \ 
     -Dversion=1.1.01 \
     -Dpackaging=jar
    

Configuration

Define current profile in src/main/resources/application.properties

# Active Profile
spring.profiles.active=devel

Set database properties in src/main/resources/application-{active_profile}.yml

# Database configuration
spring.datasource:
    url: jdbc:mysql://localhost/slackLti
    username: slackLti
    password: slackLti
    driverClassName: com.mysql.jdbc.Driver

Slack Oauth

We use Slack Web API for getting user's info (that is because the launch url is user agnostic).

Set client properties in src/main/resources/application-{active_profile}.yml:

security:
  oauth2:
    client:
        clientId: <your client id>
        clientSecret: <your client secret>

Visit https://api.slack.com/apps for registering an app and getting the client id and secret.

slack-lti-commands's People

Watchers

 avatar  avatar  avatar

slack-lti-commands's Issues

Use Tsugi consumer

Use Tsugi for managing the consumers instead of org.oscelot.lti-tool-provider

database table for each channel

Now all channels share the same database table for the lti consumers. It would be great to have separate tables for each channel (maybe channel_id_lti_consumer).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.