http-authentication

HTTP Basic Authentication with HTTPService Objects in Adobe Flex/AIR

五迷三道 提交于 2019-11-27 17:43:09
I'm trying to request a HTTP resource that requires basic authorization headers from within an Adobe AIR application. I've tried manually adding the headers to the request, as well as using the setRemoteCredentials() method to set them, to no avail. Here's the code: <mx:Script> <![CDATA[ import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; private function authAndSend(service:HTTPService):void { service.setRemoteCredentials('someusername', 'somepassword'); service.send(); } private function resultHandler(event:ResultEvent):void { apiResult.text = event.result.toString(); }

Basic HTTP authentication with Node and Express 4

蹲街弑〆低调 提交于 2019-11-27 17:04:24
It looks like implementing basic HTTP authentication with Express v3 was trivial: app.use(express.basicAuth('username', 'password')); Version 4 (I'm using 4.2) removed the basicAuth middleware, though, so I'm a little stuck. I have the following code, but it doesn't cause the browser to prompt the user for credentials, which is what I'd like (and what I imagine the old method did): app.use(function(req, res, next) { var user = auth(req); if (user === undefined || user['name'] !== 'username' || user['pass'] !== 'password') { res.writeHead(401, 'Access invalid for user', {'Content-Type' : 'text

How do I use libcurl to login to a secure website and get at the html behind the login

痴心易碎 提交于 2019-11-27 17:02:46
问题 Hey guys, I was wondering if you guys could help me work through accessing the html behind a login page using C and libcurl. Specific Example: The website I'm trying to access is https://onlineservices.ubs.com/olsauth/ex/pbl/ubso/dl Is it possible to do something like this? The problem is that we have a lot of clients each of which has a separate login. We need to get data from each of their accounts every day. It would be really slick if we could write something in C to do this and save all

How do I keep Firefox from prompting for username/password with HTTP Basic Auth with JQuery AJAX?

梦想与她 提交于 2019-11-27 13:18:27
I'm writing some browser side dynamic functionality and using HTTP Basic Auth to protect some resources. The user experience is very important and is highly customized. Here's a simple test JQuery method that eventually will test if a user has supplied the right credentials in a form: $(document).ready(function() { $("#submit").click(function() { var token = Base64.encode($('#username').val() + ':' + $('#password').val()); $.ajax({ url: '/private', method: 'GET', async: false, beforeSend: function(req) { req.setRequestHeader('Authorization', 'test:password'); }, error: function(request,

Stuck with Python HTTP Server with Basic Authentication using BaseHTTP

被刻印的时光 ゝ 提交于 2019-11-27 12:30:46
问题 I am stuck trying to get a python based webserver to work. I want to do Basic Authentication (sending a 401 header) and authenticating against a list of users. I have no trouble sending the 401 response with "WWW-Authorize" header, I can validate the users response (base64 encoded username & password), however, the login box keeps popping up after successful validation. import SimpleHTTPServer import SocketServer from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer class Handler

Can I use HTTP Basic Authentication with Django?

佐手、 提交于 2019-11-27 11:27:23
We have a website running on Apache, access to which has a number of static pages protected via HTTP Basic authentication. I've written a new part of the site with Django using Django's built in support for user management. The problem I have is that users have to log in once via the HTTP Basic authentication and then again using a Django login form. This both clumsy and very confusing for users. I was wondering if anyone had found a way to make Django log a user in using the HTTP Basic authentication information. I not expecting to pass a password to Django, but rather if a user dave has been

JQuery Ajax calls with HTTP Basic Authentication

半城伤御伤魂 提交于 2019-11-27 10:51:50
问题 I have a REST based server which I am trying to communicate with using JQuery. Both XML and JSON are available as response formats, so I am using JSON. The connections are all SSL so HTTP Basic Authentication has been our authorization method of choice, and we have had no problems with other front ends (raw Javascript, Silverlight, etc...) Now I am attempting to put something together with JQuery and having endless problems using HTTP Basic Authentication. I have scoured through numerous

Basic HTTP Authentication on iPhone

*爱你&永不变心* 提交于 2019-11-27 10:45:38
I'm trying to get a small twitter client running and I ran into a problem when testing API calls that require authentication. My password has special characters in it, so when I try to use the following code it doesn't work. NSString *post = [NSString stringWithFormat:@"status=%@", [status stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]]; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init]

JMeter Basic Authentication

痴心易碎 提交于 2019-11-27 07:14:38
I am trying to imply the basic authentication process for a web service using JMeter. But everytime it throws out an error 401:Unauthorized. I tried using the HTTP Header manager to add a header Authorization and value to it. Still it does not work. I have also tried using the HTTP Authorization manager. Still no luck. Can someone help. I've found through debugging requests coming in from JMeter that the HTTP Authorization Manager module doesn't encode the username and password correctly. It puts a newline character after the username. To run a JMeter test against a Basic Auth protected

HTTP Basic Authentication with HTTPService Objects in Adobe Flex/AIR

Deadly 提交于 2019-11-27 04:13:37
问题 I'm trying to request a HTTP resource that requires basic authorization headers from within an Adobe AIR application. I've tried manually adding the headers to the request, as well as using the setRemoteCredentials() method to set them, to no avail. Here's the code: <mx:Script> <![CDATA[ import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; private function authAndSend(service:HTTPService):void { service.setRemoteCredentials('someusername', 'somepassword'); service.send(); }