mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Changes from comments in PR#443
This commit is contained in:
parent
30acd4875d
commit
f63da07a3e
@ -59,10 +59,10 @@ import android.util.Log;
|
|||||||
*/
|
*/
|
||||||
public class RemoteOperationResult implements Serializable {
|
public class RemoteOperationResult implements Serializable {
|
||||||
|
|
||||||
/** Generated - should be refreshed every time the class changes!! */
|
/** Generated - should be refreshed every time the class changes!! */;
|
||||||
private static final long serialVersionUID = -8257349554488668693L;
|
private static final long serialVersionUID = 6160608497101537164L;
|
||||||
|
|
||||||
private static final String TAG = "RemoteOperationResult";
|
private static final String TAG = "RemoteOperationResult";
|
||||||
|
|
||||||
public enum ResultCode {
|
public enum ResultCode {
|
||||||
OK,
|
OK,
|
||||||
@ -105,6 +105,7 @@ public class RemoteOperationResult implements Serializable {
|
|||||||
private Exception mException = null;
|
private Exception mException = null;
|
||||||
private ResultCode mCode = ResultCode.UNKNOWN_ERROR;
|
private ResultCode mCode = ResultCode.UNKNOWN_ERROR;
|
||||||
private String mRedirectedLocation;
|
private String mRedirectedLocation;
|
||||||
|
private String mAuthenticate;
|
||||||
|
|
||||||
private ArrayList<Object> mData;
|
private ArrayList<Object> mData;
|
||||||
|
|
||||||
@ -155,6 +156,10 @@ public class RemoteOperationResult implements Serializable {
|
|||||||
mRedirectedLocation = current.getValue();
|
mRedirectedLocation = current.getValue();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if ("WWW-Authenticate".equals(current.getName())) {
|
||||||
|
mAuthenticate = current.getValue();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -359,5 +364,10 @@ public class RemoteOperationResult implements Serializable {
|
|||||||
(mRedirectedLocation.toUpperCase().contains("SAML") ||
|
(mRedirectedLocation.toUpperCase().contains("SAML") ||
|
||||||
mRedirectedLocation.toLowerCase().contains("wayf")));
|
mRedirectedLocation.toLowerCase().contains("wayf")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isBasicAuthentication() {
|
||||||
|
return (mAuthenticate != null &&
|
||||||
|
(mAuthenticate.toUpperCase().startsWith("BASIC")));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user