Don't need authorization when get file list
This commit is contained in:
parent
149913463f
commit
0f247fac4e
|
|
@ -118,9 +118,9 @@ public class API {
|
|||
|
||||
private HashMap<String, String> getHeaderAuth() {
|
||||
HashMap<String, String> headers = getHeader();
|
||||
headers.put("authorization", user.getAuthorization());
|
||||
headers.put("x-share-token", shareToken);
|
||||
headers.put("X-Canary", "client=Android,app=adrive,version=v4.3.1");
|
||||
if (user.isAuthed()) headers.put("authorization", user.getAuthorization());
|
||||
return headers;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,10 @@ public class User {
|
|||
return getTokenType() + " " + getAccessToken();
|
||||
}
|
||||
|
||||
public boolean isAuthed() {
|
||||
return getTokenType().length() > 0 && getAccessToken().length() > 0;
|
||||
}
|
||||
|
||||
public User clean() {
|
||||
this.refreshToken = "";
|
||||
this.accessToken = "";
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
7398eb8460de8e8da9e898f465524414
|
||||
493c8d428897bd6133ffd22eb1cb0495
|
||||
|
|
|
|||
Loading…
Reference in New Issue