Update customer_token.rb

This commit is contained in:
ricky authored and GitHub committed 2016-09-01 23:52:39 -04:00
1 parent 731b811cfe
commit e6fee6bd97
1 file changed
+2 -2
+2 -2
View File
@@ -15,7 +15,7 @@ class CustomerToken < ActiveRecord::Base
OAUTH_CONSUMER_SECRET = Setting.plugin_redmine_qbo['settingsOAuthConsumerSecret'] OAUTH_CONSUMER_SECRET = Setting.plugin_redmine_qbo['settingsOAuthConsumerSecret']
def generate_token(issue) def generate_token
self.token = SecureRandom.base64(issue.id + issue.customer_id).tr('+/=lIO0', OAUTH_CONSUMER_SECRET) self.token = SecureRandom.base64(15).tr('+/=lIO0', OAUTH_CONSUMER_SECRET)
end end
end end