omniauth-lti 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -5,6 +5,17 @@ The OmniAuth LTI gem provides a way for applications to authenticate users using
5
5
 
6
6
  It relies on [ims-lti gem][] for validating LTI data.
7
7
 
8
+ Installation
9
+ ============
10
+
11
+ Add the gem in your Gemfile:
12
+
13
+ gem 'omniauth-lti'
14
+
15
+ And install it using bundle
16
+
17
+ bundle install
18
+
8
19
  Usage
9
20
  =====
10
21
 
@@ -14,7 +25,7 @@ Add the provider to your OmniAuth stack, giving the tool_consumer credentials:
14
25
  provider :lti, :oauth_credentials => {:test => 'secret'}
15
26
  end
16
27
 
17
- Include Omniauth::Lti::Context in your application_controller:
28
+ Include `Omniauth::Lti::Context` in your `application_controller`:
18
29
 
19
30
  class ApplicationController < ActionController::Base
20
31
  ...
@@ -22,19 +33,19 @@ Include Omniauth::Lti::Context in your application_controller:
22
33
  ...
23
34
  end
24
35
 
25
- When you create the session in your sessions\_controller, call to save_lti_context for saving LTI context through all the application
36
+ When you create the session in your `sessions\_controller`, call to `save_lti_context` for saving LTI context through all the application
26
37
 
27
- For accessing the context anywhere in your application, just call the helper method lti\_tool\_provider.
38
+ For accessing the context anywhere in your application, just call the helper method `lti_tool_provider`.
28
39
  For instance, to show the title of the resource that call your application just put in your haml view:
29
40
 
30
41
  =lti_tool_provider.resource_link_title
31
42
 
32
43
  You can find an example web application in [omniauth-lti-example-webapp][]
33
44
 
34
- TODO
35
- =====
45
+ Outcomes
46
+ ========
36
47
 
37
- Add support for outcomes
48
+ `lti_tool_provider` gives you the full `IMS::LTI::ToolProvider` class. Please refer to (https://github.com/instructure/ims-lti#returning-results-of-a-quizassignment) to see how to do outcomes with this class
38
49
 
39
50
  [ims-lti gem]: https://github.com/instructure/ims-lti
40
51
  [omniauth-lti-example-webapp]: https://github.com/xaviaracil/omniauth-lti-example
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Lti
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -50,7 +50,9 @@ module OmniAuth
50
50
 
51
51
  def valid_lti?
52
52
  key = request.params['oauth_consumer_key']
53
+ log :info, "Checking LTI params for key #{key}: #{request.params}"
53
54
  @tp = IMS::LTI::ToolProvider.new(key, options.oauth_credentials[key], request.params)
55
+ log :info, "Valid request? #{@tp.valid_request!(request)}"
54
56
  @tp.valid_request!(request)
55
57
  end
56
58
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: omniauth-lti
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Xavi Aracil