mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-08 16:36:13 +00:00
Redirections to the Identity Provider (IdP) are translated into ResultCode.UNAUTHORIZED
This commit is contained in:
parent
d36fa0b38b
commit
78b9aa6247
@ -307,7 +307,8 @@ public abstract class RemoteOperation implements Runnable {
|
||||
* to trigger authentication update */
|
||||
if (mCallerActivity != null && mAccount != null && mContext != null &&
|
||||
!result.isSuccess() &&
|
||||
(result.getCode() == ResultCode.UNAUTHORIZED || result.isIdPRedirection())) {
|
||||
ResultCode.UNAUTHORIZED.equals(result.getCode())
|
||||
) {
|
||||
/// possible fail due to lack of authorization
|
||||
// in an operation performed in foreground
|
||||
OwnCloudCredentials cred = mClient.getCredentials();
|
||||
|
@ -183,6 +183,9 @@ public class RemoteOperationResult implements Serializable {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isIdPRedirection()) {
|
||||
mCode = ResultCode.UNAUTHORIZED; // overrides default ResultCode.UNKNOWN
|
||||
}
|
||||
}
|
||||
|
||||
public RemoteOperationResult(boolean success, String bodyResponse, int httpCode) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user