metamaps--metamaps/config/initializers/uservoice.rb
2014-10-07 17:46:09 -04:00

11 lines
No EOL
302 B
Ruby

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