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/
Related
I am using Django as my backend for my android app. I have been handling post request using #csrf-exempt annotation with my views as I wasn't able to deal with csrf verification while sending post request from android(VOLLEY LIBRARY).
Now, I have to use django.contrib.auth login and logout methods but sessions aren't working when I am sending post request from android.
I had tried enabling cookies with my request in android but that also didn't work(enabling cookies also did not solve the csrf verification failed issue).Also I tried taking csrf token from a GET request to django( django.middleware.csrf - get_token) and then passing that csrf token in headers(X-CSRF-TOKEN)in my post requests, that also didn't work.
Code that I used to enable cookies in android:
CookieManager manager = new CookieManager();
CookieHandler.setDefault(manager);
So,
1. I don't know how to use django scripts without using #csrf-exempt from android.
2. and how to use django login with android
Here is a generic response on using django as a backend: Is it possible to develop the back-end of a native mobile app using the python powered framework Django?
More specifically this is normally done with a JWT - json web token: http://www.django-rest-framework.org/api-guide/authentication/#django-rest-auth
I'm sure other rest/ api frameworks exist but I normally use DRF.
Here is an example with a tutorial: Authentication with android app in a django server
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 new the android programming,I want to integrate the mixit social network in my app like facebook.To integrate the mixit I have to get the authorization request using Http connection using TLS.but I dont know how to write code for HTTP TLS connection.So please give me any guidance to proceed further.
Thanks in advance
I have a WebView embedded in my application. I am trying to view a webpage that uses NTLM authentication. How can I perform the NTLM authentication using the WebView and view this page?
I was successfully able to authenticate to this page using DefaultHttpClient and the JCIFS Library. But how can I do it for the WebView?
It has been two years since I asked this question. In the meantime, I figured out the answer to this question -
WebView supports NTLM authentication out-of-the-box. The onReceivedHttpAuthRequest callback in WebViewClient has a method parameter a method parameter named handler. This is of the type HttpAuthHandler. handler.proceed(username, password) will automatically authenticate to the web server using NTLM protocol. This handler abstracts the authentication protocol used. Both Basic and NTLM authentication work using the same line of code.
I'm having the same problem! There is another indirect way. You get the HttpResponse and then save the html file to the internal storage and then load the file into the WebView. I never tried this before, though.
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 :)