From 2765afc92e13d9e751a036d53736bf42978e5b87 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 13 Aug 2021 14:48:01 +0200 Subject: Add WEB_AUTH pending auth support --- main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java | 5 +++-- main/src/ui/java/de/blinkt/openvpn/core/VariantConfig.java | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'main/src/ui') diff --git a/main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java b/main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java index 419f49e2..1d81da1a 100644 --- a/main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java +++ b/main/src/ui/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java @@ -172,7 +172,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable config.setContent(vpnconfig); config.setTunPersist(mVp.mPersistTun); config.setGuiVersion(mVp.getVersionEnvString(mService)); - config.setSsoMethods("openurl,crtext"); + config.setSsoMethods("openurl,webauth,`crtext"); config.setPlatformVersion(mVp.getPlatformVersionEnvString()); config.setExternalPkiAlias("extpki"); config.setCompressionMode("asym"); @@ -303,7 +303,8 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable String name = event.getName(); String info = event.getInfo(); if (name.equals("INFO")) { - if (info.startsWith("OPEN_URL:") || info.startsWith("CR_TEXT:")) { + if (info.startsWith("OPEN_URL:") || info.startsWith("CR_TEXT:") + || info.startsWith("WEB_AUTH:")) { mService.trigger_sso(info); } else { VpnStatus.logInfo(R.string.info_from_server, info); diff --git a/main/src/ui/java/de/blinkt/openvpn/core/VariantConfig.java b/main/src/ui/java/de/blinkt/openvpn/core/VariantConfig.java index 5db8382c..bc7df548 100644 --- a/main/src/ui/java/de/blinkt/openvpn/core/VariantConfig.java +++ b/main/src/ui/java/de/blinkt/openvpn/core/VariantConfig.java @@ -12,7 +12,10 @@ import de.blinkt.openvpn.activities.InternalWebView; public class VariantConfig { /** Return the normal webview or internal webview depending what is available */ - static Intent getOpenUrlIntent(Context c) { - return new Intent(c, InternalWebView.class); + static Intent getOpenUrlIntent(Context c, boolean external) { + if (external) + return new Intent(Intent.ACTION_VIEW); + else + return new Intent(c, InternalWebView.class); } } -- cgit v1.2.3