6 releases
0.3.1 | Apr 12, 2021 |
---|---|
0.3.0 | Feb 8, 2021 |
0.2.2 | Jan 7, 2018 |
0.2.0 | Dec 23, 2017 |
0.1.0 | Dec 23, 2017 |
#20 in #launch
27 downloads per month
13KB
97 lines
LTI
About
This is a rust library designed to facilitate building LTI applications. LTI prescribes a way to integrate rich learning applications (often remotely hosted and provided through third-party services) with platforms like learning management systems (LMS), portals, learning object repositories or other educational environments managed locally or in the cloud. More info about the LTI standard can be found here
Installation
Add lti = "0.3.0"
to your Cargo.toml file
Usage
The primary use case of LTI is to verify an lti launch. This ensures that the request to your application has not been tampered with and allows you to trust the given POST parameters.
Example of verifying an lti launch:
extern crate lti;
let my_www_form_urlencoded_params = "oauth_consumer_key=asdf...";
let my_consumer_secret = "asdf";
let valid_launch: bool = lti::verify_lti_launch(
// HTTP Method (for lti launches this should be a post)
"POST",
// Full Uri for the lti launch
"https://my_domain/lti_launch",
// Url encoded request parameters
my_www_form_urlencoded_params,
// Consumer secret shared between Tool Consumer and Tool Provider
my_consumer_secret
);
Contributors
Portions of this code, in particular, the code that signs oauth requests was heavily influenced, or taken from oauth-client-rs. I hope to be able to contribute back to that project upon hearing back from the project owner.
Dependencies
~9.5MB
~281K SLoC