Эх сурвалжийг харах

Merge branch 'saml_based_federated_single_sign_on' into sso_bug_changing_orientation

David A. Velasco 11 жил өмнө
parent
commit
f67af8fd64

+ 1 - 1
src/com/owncloud/android/authentication/AuthenticatorActivity.java

@@ -744,7 +744,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
             // NOTHING TO DO ; can't find out what situation that leads to the exception in this code, but user logs signal that it happens
         }
         
-        if (result.isTemporalRedirection()) {
+        if (result.isTemporalRedirection() || result.isIdPRedirection()) {
             String url = result.getRedirectedLocation();
             String targetUrl = mHostBaseUrl + AccountUtils.getWebdavPath(mDiscoveredVersion, mCurrentAuthTokenType);
             

+ 5 - 1
src/com/owncloud/android/operations/RemoteOperationResult.java

@@ -24,7 +24,6 @@ import java.net.MalformedURLException;
 import java.net.SocketException;
 import java.net.SocketTimeoutException;
 import java.net.UnknownHostException;
-import java.util.Map;
 
 import javax.net.ssl.SSLException;
 
@@ -319,5 +318,10 @@ public class RemoteOperationResult implements Serializable {
     public String getRedirectedLocation() {
         return mRedirectedLocation;
     }
+    
+    public boolean isIdPRedirection() {
+        return (mRedirectedLocation.toUpperCase().contains("SAML") || 
+                mRedirectedLocation.toLowerCase().contains("wayf"));
+    }
 
 }