mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +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 */ |         	 * 						to trigger authentication update */ | ||||||
|             if (mCallerActivity != null && mAccount != null && mContext != null && |             if (mCallerActivity != null && mAccount != null && mContext != null && | ||||||
|                     !result.isSuccess() && |                     !result.isSuccess() && | ||||||
|                     (result.getCode() == ResultCode.UNAUTHORIZED || result.isIdPRedirection())) { |                     ResultCode.UNAUTHORIZED.equals(result.getCode()) | ||||||
|  |                 ) { | ||||||
|                 /// possible fail due to lack of authorization |                 /// possible fail due to lack of authorization | ||||||
|                 // in an operation performed in foreground |                 // in an operation performed in foreground | ||||||
|                 OwnCloudCredentials cred = mClient.getCredentials(); |                 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) { |     public RemoteOperationResult(boolean success, String bodyResponse, int httpCode) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user