Don't need authorization when get file list
This commit is contained in:
parent
5a39410292
commit
2ab5cf5df0
|
|
@ -118,9 +118,9 @@ public class API {
|
||||||
|
|
||||||
private HashMap<String, String> getHeaderAuth() {
|
private HashMap<String, String> getHeaderAuth() {
|
||||||
HashMap<String, String> headers = getHeader();
|
HashMap<String, String> headers = getHeader();
|
||||||
headers.put("authorization", user.getAuthorization());
|
|
||||||
headers.put("x-share-token", shareToken);
|
headers.put("x-share-token", shareToken);
|
||||||
headers.put("X-Canary", "client=Android,app=adrive,version=v4.3.1");
|
headers.put("X-Canary", "client=Android,app=adrive,version=v4.3.1");
|
||||||
|
if (user.isAuthed()) headers.put("authorization", user.getAuthorization());
|
||||||
return headers;
|
return headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,10 @@ public class User {
|
||||||
return getTokenType() + " " + getAccessToken();
|
return getTokenType() + " " + getAccessToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isAuthed() {
|
||||||
|
return getTokenType().length() > 0 && getAccessToken().length() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
public User clean() {
|
public User clean() {
|
||||||
this.refreshToken = "";
|
this.refreshToken = "";
|
||||||
this.accessToken = "";
|
this.accessToken = "";
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
7398eb8460de8e8da9e898f465524414
|
493c8d428897bd6133ffd22eb1cb0495
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;7398eb8460de8e8da9e898f465524414",
|
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;493c8d428897bd6133ffd22eb1cb0495",
|
||||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;7398eb8460de8e8da9e898f465524414",
|
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;493c8d428897bd6133ffd22eb1cb0495",
|
||||||
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue