问题
I have a WCF Service hosted by an ASP.net web application where user is authenticated using windows authentication. Now I am trying to write an Android application to consume this WCF Service.
Any idea how to get my application windows-authenticated to be able to start consuming the service?
回答1:
You won't be able to use Windows Integrated authentication (it's proprietary), but you could use either Basic auth (transport-layer encryption/SSL highly recommended) or OAuth combined with OWIN.
回答2:
Out of the box, there is no support. But you could look into JCIFS (http://jcifs.samba.org/); a library that implements the CIFS/SMB networking protocol. That library coupled together with the documentation here on Apache's HTTP client (https://hc.apache.org/httpcomponents-client-ga/ntlm.html) should help you integrate Windows Authentication into your Android app.
来源:https://stackoverflow.com/questions/27239389/xamarin-authenticating-android-application-using-windows-authentication