I'm trying to find a way with a non-activity (ok, a Widget Service, or just a plain Service) to 'login' to a particular web service. That server, upon not having a websocket authenticated session, serves up a login page. It uses LuCI, and is described as an interstitial login page. The goal is to get into the server w/o any modification to the server. It is essentially a dd-wrt router. Post login a page is served with an auth token.
From an activity I am successful using a WebView with WebViewExtras to executeJavascript through B4a.CallSub to a processHtml type solution, but can't use that in a Widget Service (did try anyway, failed). Basically I'm looking for the equivalent logic without the view. By the way, _userandpasswordrequired is not getting called. If I get access to the source for webview (or flingable), would I be able to extract the logic from the view?
I didn't find a way to, with httpjob, Post a user/pw to the login form on this particular server. It is serving up the attached source page. Is it possible to use httpjob to post a login user/pw ? Perhaps I just made a mistake.
With the standard B4A HttpUtils2 setting .Username and .Password on a HttpJob (unlikely longshot) didn't work. With .u and .pw httpUtils2 uses ExecuteCredentials.
Found in the B4J area this thread about InitializeAcceptAll for B4A HttpUtils2Service. Probably another unlikely longshot. No, I'm not an expert on luci/etc.
Is there an equivalent for B4A? Would InitializeAcceptAll help for this case?
Tried using the one from there, slightly modified (removed fx) but get
by the HttpJob download2 from that same thread's attachment. Longer error text attached.
I did try storing the authentication information from an App webview successful session, but the server is seeing the httpjob as another source, thus I need to re-auth. Is there a way to spoof that?
From an activity I am successful using a WebView with WebViewExtras to executeJavascript through B4a.CallSub to a processHtml type solution, but can't use that in a Widget Service (did try anyway, failed). Basically I'm looking for the equivalent logic without the view. By the way, _userandpasswordrequired is not getting called. If I get access to the source for webview (or flingable), would I be able to extract the logic from the view?
I didn't find a way to, with httpjob, Post a user/pw to the login form on this particular server. It is serving up the attached source page. Is it possible to use httpjob to post a login user/pw ? Perhaps I just made a mistake.
With the standard B4A HttpUtils2 setting .Username and .Password on a HttpJob (unlikely longshot) didn't work. With .u and .pw httpUtils2 uses ExecuteCredentials.
Found in the B4J area this thread about InitializeAcceptAll for B4A HttpUtils2Service. Probably another unlikely longshot. No, I'm not an expert on luci/etc.
Is there an equivalent for B4A? Would InitializeAcceptAll help for this case?
Tried using the one from there, slightly modified (removed fx) but get
java.lang.RuntimeException: Code module does not support this method.
for CallSubDelayed2(HttpUtils2Service, "SubmitJob", Me)by the HttpJob download2 from that same thread's attachment. Longer error text attached.
I did try storing the authentication information from an App webview successful session, but the server is seeing the httpjob as another source, thus I need to re-auth. Is there a way to spoof that?