Commit e5e41009ebc05601c3393842037be7c6bbe81ca9
1 parent
c9fabd0d
Exists in
master
CHG: access token expiration
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/dingtalk/api/base.rb
@@ -30,7 +30,7 @@ module Dingtalk | @@ -30,7 +30,7 @@ module Dingtalk | ||
30 | res = http_get("#{ENDPOINT}/gettoken?corpid=#{@corp.corp_id}&corpsecret=#{@corp.corp_secret}") | 30 | res = http_get("#{ENDPOINT}/gettoken?corpid=#{@corp.corp_id}&corpsecret=#{@corp.corp_secret}") |
31 | key = "#{@corp.corp_id}_#{ACCESS_TOKEN}" | 31 | key = "#{@corp.corp_id}_#{ACCESS_TOKEN}" |
32 | redis.set(key, res['access_token']) | 32 | redis.set(key, res['access_token']) |
33 | - redis.expire(key, 60) | 33 | + redis.expire(key, 6600) |
34 | redis.get(key) | 34 | redis.get(key) |
35 | end | 35 | end |
36 | 36 |