|
|
@ -332,7 +332,9 @@ function getOpenToken(authorization) { |
|
|
|
refresh_token: refresh_token |
|
|
|
refresh_token: refresh_token |
|
|
|
} |
|
|
|
} |
|
|
|
variable = 1; |
|
|
|
variable = 1; |
|
|
|
|
|
|
|
log('1111'); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
log('2222'); |
|
|
|
let json = JSON.parse(request('https://www.alipan.com/o/oauth/authorize?client_id=76917ccccd4441c39457a04f6084fb2f&redirect_uri=https://alist.nn.ci/tool/aliyundrive/callback&scope=user:base,file:all:read,file:all:write&state=', { |
|
|
|
let json = JSON.parse(request('https://www.alipan.com/o/oauth/authorize?client_id=76917ccccd4441c39457a04f6084fb2f&redirect_uri=https://alist.nn.ci/tool/aliyundrive/callback&scope=user:base,file:all:read,file:all:write&state=', { |
|
|
|
headers: headers, |
|
|
|
headers: headers, |
|
|
|
body: { |
|
|
|
body: { |
|
|
@ -342,8 +344,10 @@ function getOpenToken(authorization) { |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
timeout: 8000 |
|
|
|
timeout: 8000 |
|
|
|
})); |
|
|
|
})); |
|
|
|
|
|
|
|
log(json); |
|
|
|
let code = json.redirectUri.split("code=")[1]; |
|
|
|
let code = json.redirectUri.split("code=")[1]; |
|
|
|
data = { "code": code, "grant_type": "authorization_code" } |
|
|
|
data = { "code": code, "grant_type": "authorization_code" } |
|
|
|
|
|
|
|
log(data); |
|
|
|
variable = 0; |
|
|
|
variable = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
let json2 = {}; |
|
|
|
let json2 = {}; |
|
|
|