Swissmade Well-Known Member Licensed User Longtime User Aug 5, 2014 #1 In B4A you have a event Webview1_UserAndPasswordRequired when it comes to Login. I have not found this in the B4J version. Somebody any idea about this. Thanks
In B4A you have a event Webview1_UserAndPasswordRequired when it comes to Login. I have not found this in the B4J version. Somebody any idea about this. Thanks
Erel B4X founder Staff member Licensed User Longtime User Aug 5, 2014 #2 This is currently not possible without writing a small library. If you like to build such library I can guide you. Upvote 0
This is currently not possible without writing a small library. If you like to build such library I can guide you.
Swissmade Well-Known Member Licensed User Longtime User Aug 5, 2014 #3 Erel said: This is currently not possible without writing a small library. If you like to build such library I can guide you. Click to expand... Interesting. Something like JWebView-Extra In which language has this library to be written Erel? Upvote 0
Erel said: This is currently not possible without writing a small library. If you like to build such library I can guide you. Click to expand... Interesting. Something like JWebView-Extra In which language has this library to be written Erel?
Erel B4X founder Staff member Licensed User Longtime User Aug 6, 2014 #4 Java. You need to create a class with this code: B4X: public void SetUserAndPassword(final String user, final String password) { Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(user, password.toCharArray()); } }); } Upvote 0
Java. You need to create a class with this code: B4X: public void SetUserAndPassword(final String user, final String password) { Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(user, password.toCharArray()); } }); }
Swissmade Well-Known Member Licensed User Longtime User Aug 6, 2014 #5 Erel said: Java. You need to create a class with this code: B4X: public void SetUserAndPassword(final String user, final String password) { Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(user, password.toCharArray()); } }); } Click to expand... Nice but I think this has to go in the WEBview class. Bad that i'm not so good in Java to do this Upvote 0
Erel said: Java. You need to create a class with this code: B4X: public void SetUserAndPassword(final String user, final String password) { Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(user, password.toCharArray()); } }); } Click to expand... Nice but I think this has to go in the WEBview class. Bad that i'm not so good in Java to do this
Erel B4X founder Staff member Licensed User Longtime User Aug 6, 2014 #6 Nice but I think this has to go in the WEBview class. Click to expand... No. It doesn't need to go in WebView. Upvote 0
Nice but I think this has to go in the WEBview class. Click to expand... No. It doesn't need to go in WebView.
Swissmade Well-Known Member Licensed User Longtime User Aug 7, 2014 #7 Hi Erel, Good news its working. I have build a Library called HTTPAuth in Eclipse. Please if you like test this. For me it is working at the moment. Wondering what's happening when I need different logins. Attachments jHttpAuth.zip 2.2 KB · Views: 336 Upvote 0
Hi Erel, Good news its working. I have build a Library called HTTPAuth in Eclipse. Please if you like test this. For me it is working at the moment. Wondering what's happening when I need different logins.
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2014 #8 Wondering what's happening when I need different logins. Click to expand... Each call to this method will replace the user name and password. This means that you cannot make concurrent calls with different credentials. Upvote 0
Wondering what's happening when I need different logins. Click to expand... Each call to this method will replace the user name and password. This means that you cannot make concurrent calls with different credentials.
Swissmade Well-Known Member Licensed User Longtime User Aug 7, 2014 #9 Erel said: Each call to this method will replace the user name and password. Click to expand... Ok will see what I can do for this Issue. Upvote 0
Erel said: Each call to this method will replace the user name and password. Click to expand... Ok will see what I can do for this Issue.