|
@@ -14,11 +14,13 @@ func FirstAuth(args map[string]string) map[string]string { |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return data |
|
|
return data |
|
|
} |
|
|
} |
|
|
endTime := time.Now().Unix() + gjson.Get(send, "data.expires_in").Int() - 10 |
|
|
|
|
|
|
|
|
endTime := time.Now().Unix() + gjson.Get(send, "data.expires_in").Int() |
|
|
|
|
|
refreshEndTime := time.Now().Unix() + gjson.Get(send, "data.refresh_expires_in").Int() |
|
|
data = map[string]string{ |
|
|
data = map[string]string{ |
|
|
"tik_tok_acc_token": gjson.Get(send, "data.access_token").String(), |
|
|
|
|
|
"tik_tok_acc_token_time": zhios_third_party_utils.Int64ToStr(endTime), |
|
|
|
|
|
"tik_tok_acc_refresh_token": gjson.Get(send, "data.refresh_token").String(), |
|
|
|
|
|
|
|
|
"tik_tok_acc_token": gjson.Get(send, "data.access_token").String(), |
|
|
|
|
|
"tik_tok_acc_token_time": zhios_third_party_utils.Int64ToStr(endTime), |
|
|
|
|
|
"tik_tok_acc_refresh_token_time": zhios_third_party_utils.Int64ToStr(refreshEndTime), |
|
|
|
|
|
"tik_tok_acc_refresh_token": gjson.Get(send, "data.refresh_token").String(), |
|
|
} |
|
|
} |
|
|
return data |
|
|
return data |
|
|
} |
|
|
} |
|
@@ -29,7 +31,7 @@ func RefreshAuth(args map[string]string) map[string]string { |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return data |
|
|
return data |
|
|
} |
|
|
} |
|
|
endTime := time.Now().Unix() + gjson.Get(send, "data.expires_in").Int() - 10 |
|
|
|
|
|
|
|
|
endTime := time.Now().Unix() + gjson.Get(send, "data.expires_in").Int() |
|
|
data = map[string]string{ |
|
|
data = map[string]string{ |
|
|
"tik_tok_acc_token": gjson.Get(send, "data.access_token").String(), |
|
|
"tik_tok_acc_token": gjson.Get(send, "data.access_token").String(), |
|
|
"tik_tok_acc_token_time": zhios_third_party_utils.Int64ToStr(endTime), |
|
|
"tik_tok_acc_token_time": zhios_third_party_utils.Int64ToStr(endTime), |
|
|