http-authentication

WebView.setHttpAuthUsernamePassword() not working?

我的未来我决定 提交于 2019-12-12 04:27:14
问题 I am developing part of an Android application that needs to use a WebView to open a password protected site. I am using SharedPreferences to provide the username and password from when the user logs in the app for the first time. I've tested the credentials it's returning, so I know that those are correct. When I run this in the emulator, the site says that I'm unauthorized (even though I am). Here's the code: setContentView(R.layout.browser); WebView browser = (WebView) findViewById(R.id

HTTP-Authentication: how to quickly test client software through BASIC and DIGEST?

巧了我就是萌 提交于 2019-12-11 23:00:17
问题 I'm developping a Java software that should make requests towards URLs over HTTP. Some of these URLs will need HTTP authentication through DIGEST or BASIC . My client software will only contact these URLs, and if HTTP response is HTTP_OK(200), it will write output into a file. Q1 : I would like to know what is the quickest and easiest way to test the HTTP authentication DIGEST and BASIC from my client side? Q2 : Have I to install this kind of server or some "test servers" already exist on the

NodeJS - Communicating with a server that is attempting ntlm authentication, but encountering strange behavior

*爱你&永不变心* 提交于 2019-12-11 17:26:48
问题 I am attempting to write code that will allow my nodeJS server to scrape another website that is attempting to run ntlm authentication. When I arrive on the page a popup appears, into which I am supposed to enter credentials to access the site. However, that popup does not appear to be a part of chrome but a part of the OS; No matter what I try I can't find it in the elements of the page, which makes me think it is a part of the OS. (I am running Windows 10 on my development machine, but the

Download a file through http basic authentication with Xamarin Android

点点圈 提交于 2019-12-11 16:09:57
问题 I am accessing to an Enterprise Intranet using a WebView, in a Xamarin Android app. I can see and navigate correctly through the intranet but I am not able to download the files available there. This is my code : private void MWebview_Download(object sender, DownloadEventArgs e) { var url = e.Url; // var s = url.Replace(" ", "%20"); DownloadManager.Request request = new DownloadManager.Request(Android.Net.Uri.Parse(url)); string credentials = "cristina.casas:Tst.30"; //just for try // pasar

Need to view website with a self-signed certificate and http authentication

妖精的绣舞 提交于 2019-12-11 11:18:47
问题 I am having trouble viewing a website that has a self-signed certificate and also requires HTTP authentication. Currently I am trying to implement it by using How to display the Authentication Challenge in UIWebView? and UIWebView to view self signed websites (No private api, not NSURLConnection) - is it possible? as guides on how to accomplish this. I'm also trying to use the private api method of bypassing self-signed certificates but I'm having trouble finding the link to it. But the

HTTP Headers setting Authorization header stops data from loading

…衆ロ難τιáo~ 提交于 2019-12-11 08:39:05
问题 I'm using Ember.js, Ember Simple Auth plugin and jQuery to send an Authorization header cross domain using ajax. When the Authorization header is set: jqXHR.setRequestHeader('Authorization', 'Bearer ' + session.get('authToken')); Then I get a pre-flight OPTIONS request to the REST URL which I then return back the following headers: $headers->set('Access-Control-Allow-Origin', 'http://subdomain2.domain.com'); $headers->set('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');

Custom authentication for IIS hosted WCF services?

依然范特西╮ 提交于 2019-12-11 05:47:19
问题 I have a WCF (v3.5 with webHttpBinding) service hosted in IIS 6. I would like to implement custom authentication before someone can access the service i.e. user details are stored in db. But as I read on various posts and forums, for WCF services hosted in IIS only windows authentication is possible. There is no out-of-the-box way to deal with this. Can someone suggest some work around? I believe this is a very common problem that many people must have come across before. 回答1: I could

PHP Authentication (beginner)

别等时光非礼了梦想. 提交于 2019-12-11 04:06:25
问题 I have recently started learning PHP. I made a basic website and wanted to basically password it. I'd appreciate it if someone could tell me why this doesn't work. I know it doesn't work because I've tried it; I just don't understand why. <?php $user='user'; $pass='pass'; header('HTTP/1.1 401 Unauthorized'); header('WWW-Authenticate: Basic realm='.'hello'); if($_SERVER['PHP_AUTH_USER']==$user && $_SERVER['PHP_AUTH_PW']==$pass) echo 'Authorized'; else exit('Exiting'); ?> ... REST OF WEBSITE ..

Http module Authentication

时光怂恿深爱的人放手 提交于 2019-12-11 03:59:10
问题 I'm using the code below from this post to try and create a custom http module : public class BasicAuthenticationModule: IHttpModule { public void Init(HttpApplication application) { application.AuthenticateRequest += new EventHandler(Do_Authentication); } private void Do_Authentication(object sender, EventArgs e) { var request = HttpContext.Current.Request; string header = request.Headers["HTTP_AUTHORIZATION"]; if(header != null && header.StartsWith("Basic ")) { // Header is good, let's

Using WebClient to ping a web site

橙三吉。 提交于 2019-12-11 03:56:33
问题 I have a tiny app that I wanting to run and ping an internal web site. Here is the code: using (var client = new WebClient()) { client.DownloadString("http://MyServer/dev/MyApp"); } However, it is throwing the following error: The remote server returned an error: (401) Unauthorized. I have all the correct credentials to access the server. I am thinking I don't know how to use WebClient very well and I just need to set properties on the client object. Any ideas? 回答1: I found the answer. I