canvas-lms/gems/lti-advantage
Xander Moffatt 3b15bdfc28 support lti_storage_target in 1.3 login request
refs INTEROP-7087
flag=lti_platform_storage

why:
* signals to tools that Canvas supports a cookie-less launch process and
is listening for postMessages on the window designated by this param

* default value is `_parent`, which means tools should send postMessages
to `window.parent || window.opener`
* can be set to something else, in which case the tool should expect
to have a sibling frame named with this value, to which it should send
postMessages - not implemented yet since there are some kinks, so always
send `_parent`
* there are other specs that check for this list of params
in a login request - once the flag is flipped on for good,
these specs will fail and will need to be changed then

test plan:
* open the Network tab of the browser dev tools
* launch an LTI 1.3 tool
* in the login request (for the 1.3 test tool it's a POST to `/login`)
look for the lti_storage_target param - it should *not* be there
* enable the lti_platform_storage feature flag
* you may need to restart the web container and/or clear cache using
`GuardRail.activate(:deploy) { Rails.cache.clear }` to get
the flag enabling to stick
* launch an LTI 1.3 tool
* in the login request, lti_storage_target should be present in the form
data and set to `_parent`

Change-Id: Ic7539d3fdc381857c435cf7fb77f0a87ffc7c605
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274516
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2022-02-23 17:36:57 +00:00
..
lib support lti_storage_target in 1.3 login request 2022-02-23 17:36:57 +00:00
spec RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
.gitignore add lti-advantage gem 2018-07-19 18:25:52 +00:00
.rspec raise bundler minimum requirement 2021-02-19 22:49:02 +00:00
Gemfile RuboCop: Layout gems 2021-09-22 15:35:24 +00:00
LICENSE.txt add lti-advantage gem 2018-07-19 18:25:52 +00:00
README.md Include NRPS v2 claim in LTI 1.3 resource link launches 2018-10-01 22:16:25 +00:00
Rakefile RuboCop: Style/HashSyntax 2021-11-25 14:02:35 +00:00
lti-advantage.gemspec RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
test.sh Fix lti-advantage gem specs and change activemodel version 2018-08-08 19:37:10 +00:00

README.md

LtiAdvantage

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/ims/lti. To experiment with that code, run bin/console for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

Installation

Add this line to your application's Gemfile:

gem 'lti-advantage'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lti-advantage

Usage

TODO: Write usage instructions here

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/canvas-lms.

License

The gem is available as open source under the terms of the MIT License.