Is there anyway I can implement Http Digest Authentication using Google Http Java Client on Android, the request doesn't seem to have any exposed methods where I can specify the authentication.
Thanks.
Akshay
There is a feature request filed here: http://code.google.com/p/google-http-java-client/issues/detail?id=163
You can implement this manually by calling HttpRequest.getHeaders().setAuthorization(String), but you'd need to implement the logic to compute the "Authorization" header. If someone can provide the Java logic to compute the "Authorization" header for HTTP Digest, please post it here and we can mark that as the better answer :)
Related
Can't get past Django Rest Framework Token Authorization because I can't set withCredentials=true using OkHttp RequestBuilder. (I'm referring to this https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials)
In javascript using axios.post this works fine. I'm having trouble converting this post request to android using OkHttp request builder.
Request builder only seems to give setter methods for Header and Body of post Request?
Tried reading through OkHttp documentation and I've also tried to send withCredentials=True as a header
Django Rest Framework backend not recognizing the token and not resolving the bearer token to a user.
If no class authenticates, request.user will be set to an instance > of django.contrib.auth.models.AnonymousUser, and request.auth > will be set to None.
I'm going to assume here that withCredentials is a query parameter.
Appending ?withCredentials=true. to the end of the URL will probably get things going for you.
An example in full might look like https://www.example.com?withCredentials=true.
With multiple parameters, it may look like https://www.example.com?withCredentials=true&otherParam=Stuff.
Is it possible to use Android Account Manager using Cookie-based authentication? How (a code with a explanation would be much appreciated)?
I have seen many examples regarding authentication token, but that is not the case. I have just implemented cookie-based authentication on Python FLASK.
OBS.: I'm using Android Volley for the requests of the application.
All you need to do is to add this line in onCreate in your Application class:
CookieHandler.setDefault(new CookieManager());
this line will make your HttpUrlConnection hold cookies like browser, and since most of the http agents like Volley or okHttp are based on HttpUrlConnection they also will hold your cookies )
I am using Retrofit for all my api calls in my application. This is the first time I am using it and its very easy to implement.
But my server side has recently updated and they have enabled Oauth 2.
I get an access token in my sign in response which I need to pass in the header.
Please help me to do this, I know how to pass the values in the header, but the thing i need to know is, In what format should I pass the access token
Please Help!
Thanks in advance!
the OAuth 2.0 specification says access tokens can be passed in an Authorization header as in
Authorization: Bearer <access_token>
does this https://webmail.ibs-b.hu/owa/ url uses .htaccess authentication?
if yes how can I authenticate with it in android?
is there any implemented method in httprequest?
thank you
It seems that it uses HTTP based NTLM authentication: http://www.innovation.ch/personal/ronald/ntlm.html
There is no out of the box solution for Http NTLM auth on Android. But since this is all HTTP you can use HttpClient to handle it: http://danhounshell.com/blog/android-using-ntlm-authentication-with-httpclient/
I have an access token and i want to send the POST request and with the some feed in the body. The problem is i am able to get the GET request using the URLConnection but when i use the HttpPost I am not able to send the POST request.
I guess this problem has to do something with not being able to sign the POST request using HttpPost.
Can any one share the sample code for sending the POST request by signing it with the access token?
TIA
I am not really sure, but it sounds like you want to use some kind of OAuth (access tokens, etc.)?! Then http://code.google.com/p/oauth-signpost/ might be a little help for you.