ims-lti 2.0.0.beta.35 → 2.0.0.beta.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -0
- data/lib/ims/lis/roles/context/urns.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7fb47891a3a99e67cedd921d4d2e0818388f6fe
|
4
|
+
data.tar.gz: 4a9dc8e170f4a8b4dff11db0eb9dae2eaba3f241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91f82e0d48357b27e09a8fc221d72906da35a0b535fbad94bff5ac811ff440eff7931155b644f76be70a4894149d83ba28315a9c422e9184e5aac784691caded
|
7
|
+
data.tar.gz: 8bcc3d857d0f85546ad610aa8c7693a6e923d16439fa63cf99e8813c58ba067fc330389d3ac196555cef346ddc103d8a7b2ff6c8b50a318b2782fe1cce31ea16
|
data/README.md
CHANGED
@@ -20,6 +20,29 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
$ gem install lti
|
22
22
|
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
|
26
|
+
### LTI 1.x
|
27
|
+
|
28
|
+
#### Validating Launches
|
29
|
+
|
30
|
+
You can use the classes in the IMS::LTI::Models::Messages module to valdiate Launches
|
31
|
+
|
32
|
+
For example in a rails app you would do the following
|
33
|
+
```ruby
|
34
|
+
lti_message = IMS::LTI::Models::Messages::Message.generate(request.request_parameters.merge(request.query_parameters))
|
35
|
+
lti_message.launch_url = request.url
|
36
|
+
|
37
|
+
#Check if the signature is valid
|
38
|
+
return false unless lti_message.valid_signature?(shared_secret)
|
39
|
+
|
40
|
+
# check if `lti_message.oauth_nonce` has already been used
|
41
|
+
|
42
|
+
#check if the message is too old
|
43
|
+
return false if DateTime.strptime(lti_message.oauth_timestamp,'%s') > 5.minutes.ago
|
44
|
+
|
45
|
+
```
|
23
46
|
|
24
47
|
## Contributing
|
25
48
|
|
@@ -41,7 +41,7 @@ module IMS::LIS
|
|
41
41
|
Administrator = "urn:lti:role:ims/lis/Administrator"
|
42
42
|
Administrator_Administrator = "urn:lti:role:ims/lis/Administrator/Administrator"
|
43
43
|
Administrator_Support = "urn:lti:role:ims/lis/Administrator/Support"
|
44
|
-
|
44
|
+
Administrator_Developer = "urn:lti:role:ims/lis/Administrator/Developer"
|
45
45
|
Administrator_SystemAdministrator = "urn:lti:role:ims/lis/Administrator/SystemAdministrator"
|
46
46
|
Administrator_ExternalSystemAdministrator = "urn:lti:role:ims/lis/Administrator/ExternalSystemAdministrator"
|
47
47
|
Administrator_ExternalDeveloper = "urn:lti:role:ims/lis/Administrator/ExternalDeveloper"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ims-lti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.beta.
|
4
|
+
version: 2.0.0.beta.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple_oauth
|