From 68ff79c71686987fc5bdc447f2c68a723a821ca6 Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Thu, 31 Oct 2019 03:20:07 +0100 Subject: [PATCH] added HttpAuthCredentialDatabase class, clearCache method, onReceivedHttpAuthRequest event --- .idea/workspace.xml | 431 ++++++++++-------- CHANGELOG.md | 5 +- .../CredentialDatabase/Credential.java | 25 + .../CredentialContract.java | 15 + .../CredentialDatabase/CredentialDao.java | 104 +++++ .../CredentialDatabase.java | 92 ++++ .../CredentialDatabaseHelper.java | 66 +++ .../CredentialDatabase/ProtectionSpace.java | 29 ++ .../ProtectionSpaceContract.java | 16 + .../ProtectionSpaceDao.java | 98 ++++ .../CredentialDatabaseHandler.java | 119 +++++ .../flutter_inappbrowser/FlutterWebView.java | 5 + .../InAppBrowserActivity.java | 5 + .../InAppBrowserFlutterPlugin.java | 16 +- .../InAppWebView/InAppWebChromeClient.java | 7 - .../InAppWebView/InAppWebViewClient.java | 139 +++++- .../flutter_inappbrowser/Util.java | 2 + example/lib/chrome_safari_example.screen.dart | 2 +- example/lib/inline_example.screen.dart | 40 +- ios/Classes/CredentialDatabase.swift | 177 +++++++ ios/Classes/FlutterWebViewController.swift | 6 + ios/Classes/InAppWebView.swift | 152 ++++-- ios/Classes/MyCookieManager.swift | 8 +- ios/Classes/SwiftFlutterPlugin.swift | 12 + lib/flutter_inappbrowser.dart | 1 + lib/src/chrome_safari_browser.dart | 2 +- lib/src/cookie_manager.dart | 53 +-- lib/src/http_auth_credentials_database.dart | 93 ++++ lib/src/in_app_browser.dart | 7 +- lib/src/in_app_webview.dart | 27 +- lib/src/types.dart | 180 +++++++- lib/src/webview_options.dart | 167 +------ 32 files changed, 1623 insertions(+), 478 deletions(-) create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabase/Credential.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabase/CredentialContract.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabase/CredentialDao.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabase/CredentialDatabase.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabase/CredentialDatabaseHelper.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabase/ProtectionSpace.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabase/ProtectionSpaceContract.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabase/ProtectionSpaceDao.java create mode 100644 android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/CredentialDatabaseHandler.java create mode 100644 ios/Classes/CredentialDatabase.swift create mode 100644 lib/src/http_auth_credentials_database.dart diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 1e9fd305..14cc8d8b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -15,20 +15,34 @@ - - - + + + + + + + + + + + - + - + - + + + - + + + + + @@ -52,59 +66,11 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -112,8 +78,8 @@ - - + + @@ -124,17 +90,50 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -142,6 +141,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -154,16 +174,6 @@ - defaultWebpagePreferences - contentBlockers - preferredContentMode - useOnLoadResource - safe - InAppWebViewController - safeBrowsingEnabled - only - ///**NOTE**: available only for Android. - _inAppBrowser _channel uuid_ javaScriptHandlersMap @@ -182,8 +192,18 @@ appCa onSafeBrowsingHit SafeBrowsingResponse - onReceivedHttpAuthRequest iOSInAppWebViewUserPreferredContentMode + getDomainName + a + as + IABWebViewClient + clearCache + Auth + onReceivedHttpAuthRequestCallback + onReceivedHttpAuthRequest + cast + Protection + clear activity.getPreferences(0) @@ -204,8 +224,6 @@ - +