metamaps--metamaps/config/initializers/uservoice.rb
Devin Howard 7d4da81272 Update code style automatically using rubocop gem (#563)
* install rubocop

* 1961 automatic rubocop fixes

* update rubocop.yml to ignore half of the remaining cops

* rubocop lint warnings

* random other warnings fixed
2016-07-26 08:14:23 +08:00

7 lines
331 B
Ruby

require 'uservoice-ruby'
def current_sso_token
@current_sso_token ||= UserVoice.generate_sso_token('metamapscc', ENV['SSO_KEY'], {
email: current_user.email
}, 300) # Default expiry time is 5 minutes = 300 seconds
end