Skip to content

Commit

Permalink
修改临时密钥超时判断时间,60 秒
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Aug 10, 2018
1 parent 2fef2b1 commit 1059949
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/cos-js-sdk-v5.js
Original file line number Diff line number Diff line change
Expand Up @@ -5589,7 +5589,7 @@ function getAuthorizationAsync(params, callback) {
};

// 先判断是否有临时密钥
if (StsData.ExpiredTime && StsData.ExpiredTime - Date.now() / 1000 > 10) {
if (StsData.ExpiredTime && StsData.ExpiredTime - Date.now() / 1000 > 60) {
// 如果缓存的临时密钥有效,并还有超过60秒有效期就直接使用
calcAuthByTmpKey();
} else if (self.options.getAuthorization) {
Expand Down
2 changes: 1 addition & 1 deletion dist/cos-js-sdk-v5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ function getAuthorizationAsync(params, callback) {
};

// 先判断是否有临时密钥
if (StsData.ExpiredTime && StsData.ExpiredTime - (Date.now() / 1000) > 10) { // 如果缓存的临时密钥有效,并还有超过60秒有效期就直接使用
if (StsData.ExpiredTime && StsData.ExpiredTime - (Date.now() / 1000) > 60) { // 如果缓存的临时密钥有效,并还有超过60秒有效期就直接使用
calcAuthByTmpKey();
} else if (self.options.getAuthorization) { // 外部计算签名或获取临时密钥
self.options.getAuthorization.call(self, {
Expand Down

0 comments on commit 1059949

Please sign in to comment.