2016-09-24 03:00:46 +00:00
|
|
|
# frozen_string_literal: true
|
2016-02-03 13:38:41 +00:00
|
|
|
require 'uservoice-ruby'
|
|
|
|
|
|
|
|
def current_sso_token
|
2016-09-24 04:27:34 +00:00
|
|
|
@current_sso_token ||= UserVoice.generate_sso_token(
|
|
|
|
'metamapscc',
|
|
|
|
ENV['SSO_KEY'],
|
|
|
|
{ email: current_user.email },
|
|
|
|
300 # Default expiry time is 5 minutes = 300 seconds
|
|
|
|
)
|
2016-07-26 00:14:23 +00:00
|
|
|
end
|