Issue
I am having issues with authentication for my WebView
I have a https address that requires authentication but it isn't basic authentication.
When I access chrome on my phone and go to this site I get a dialogue box that asks me for a username and password I want to do something similar but all the attempts at authentication I have made have failed using what I have found, as they all seem to be for basic authentication and I don't think this is what it is.
Any help is appreciated, sorry if this is duplicate but I have looked and found nothing similar .
Solution
I am not sure what you mean by saying "it isn't basic authentication".
When you set up your WebView
, do you give it a WebViewClient
that implements onReceivedError()
? I believe that would be the vector for knowing that a 401 had occurred and requesting authentication by the user.
Alternately, use onReceivedHttpAuthRequest()
and pass the username/pwd to the handler via handler.proceed(username,pwd)
;
AFAIK a WebView
doesn't deal with the popup that you'll see in Chrome by itself. Implementing something like that is left to the developer. You create whatever authentication dialogue you require to request credentials from the user. If this is what you want, you might refer to this thread.
Answered By - Laughing_Jack
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.