Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78b9aa62 authored by David A. Velasco's avatar David A. Velasco
Browse files

Redirections to the Identity Provider (IdP) are translated into ResultCode.UNAUTHORIZED

parent d36fa0b3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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();
+3 −0
Original line number Diff line number Diff line
@@ -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) {