Skip to content

Commit

Permalink
move NONCE definition to top level initializer
Browse files Browse the repository at this point in the history
this way it doesn't have to be defined in the tc and tp apps again
  • Loading branch information
Ranko Radonić committed Apr 7, 2016
1 parent f28aa43 commit 7ac4776
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/initializers/nonce.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NONCE_TIME_TO_LIVE = 300 # seconds
3 changes: 1 addition & 2 deletions lti2_tp/config/initializers/lti2_tp.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
include Lti2Commons
include WireLogSupport

NONCE_TIME_TO_LIVE = 300 # seconds
Rails.application.config.nonce_cache = Cache.new :ttl => NONCE_TIME_TO_LIVE

if ActiveRecord::Base.connection.table_exists? 'lti2_tp_registries'
Rails.application.config.tool_provider_registry = Lti2Tp::ToolProviderRegistry.new
end

Rails.application.config.wire_log = WireLog.new "ToolProvider", File.expand_path("../tc_sample_app/public/wirelog.html")
Rails.application.config.wire_log = WireLog.new "ToolProvider", File.expand_path("../tc_sample_app/public/wirelog.html")

0 comments on commit 7ac4776

Please sign in to comment.