1
vote
0answers
28 views
+50

urllib2 HTTPPasswordMgrWithDefaultRealm 'loses' password after 5 requests

When sending email to the mailgun API I have encountered a curious Python problem that I can't resolve: the PasswordMgr created by urllib2.HTTPPasswordMgrWithDefaultRealm() seems to lose the password ...
0
votes
0answers
23 views

Retrieve json form api with basic authentication python

Hello I'm making a python script for geektool to monitor my incoming mobile messages. I've succeed to make it in java but i've never used python. api url: ...
0
votes
1answer
46 views

Basic timeout for HTTP Basic Auth

I'm serving up a static file that to view requires a basic login and password. Currently I'm just using this snippet: http://flask.pocoo.org/snippets/8/ right now it just stays active until the ...
-2
votes
2answers
49 views

How do I make Python urlib2 to cleverly avoid the security check while trying to log into a site?

I am trying to crawl a website for the first time. I am using urllib2 Python I am currently trying to log into Foursquare social networking site using Python urlib2 and Beautifulsoup. To view a ...
1
vote
2answers
1k views

Security of python flask REST API using HTTP Basic Authentication

I have python flask running on my server exposing a REST API that is being consumed by an iOS app. I'm using HTTP Basic Authentication using the Flask-HTTPAuth: module. I wanted to know how secure ...
0
votes
1answer
30 views

Django Basic HTTP AUTH

I am testing out Django 1.6 under Windows 7 using its integrated web server for debug purposes. At some point I have a view that needs to be protected by authentication. (for debug purposes - not ...
4
votes
2answers
3k views

What is the cleanest way to do HTTP POST with basic auth in Python?

What is the cleanest way to do HTTP POST with Basic Auth in Python? Using only the Python core libs.
2
votes
1answer
81 views

Accessing a web page with basic auth on python

I'm trying to connect a web page with mechanize but I'm getting a http 401 error. Here's my code; import base64, mechanize url = "http://www.dogus.edu.tr/dusor/FrmMain.aspx" user = "user" pwd = ...
1
vote
0answers
93 views

Flask-login request_loader not working?

I'm trying to implement Basic Auth on my Flask application with the Flask-Login extension. Following the documentation i tried an example request loader, but it gives me a 401 Unauthorized error, ...
1
vote
2answers
2k views

TypeError: native Qt signal is not callable

I'm trying to make a request to a protected webpage, so therefore I'm trying to authenticate with help from QAuthenticator(). However, I get the following error: mgr.authenticationRequired(response, ...
6
votes
2answers
4k views

Python SOAP client, WSDL call with suds gives Transport Error 401 Unauthorized for HTTP basic authentication

Background I'm building a SOAP client with python 2.7.3 and using the suds 0.4.1 library provided by Canonical. The server is using basic authentication over HTTPS. Problem Can't pass ...
2
votes
1answer
42 views

urllib2: correct way how to add a header to the *initial* request via AuthHandler?

this is probably a dumb question but I just cannot find a way how to create AuthHandler which would add Authorization header to the FIRST request. The only thing I see in urllib2.py are various ...
1
vote
0answers
94 views

How to convert Python HTTP Post to Coldfusion HTTP Post with Authentication

How to convert Python HTTP Post to CF HTTP Post with Basic Authentication? There seems to be an issue with the CF HTTP Post Authentication. It can't connect to the other side. What am I missing in ...
5
votes
2answers
8k views

HTTP Basic Authentication Doesn't Seem to Work with urllib2 in python

I'm trying to download a page protected with basic authentication using urllib2. I'm using python 2.7 but I also tried it on another computer with python 2.5 and encountered the exact same behavior. I ...
1
vote
2answers
2k views

How to authenticate a site with Python using urllib2?

After much reading here on Stackoverflow as well as the web I'm still struggling with getting things to work. My challenge: to get access to a restricted part of a website for which I'm a member ...
0
votes
1answer
63 views

How to add a challenge header in a forbidden_view using pyramid? [closed]

When I define a forbidden view using @forbidden_view_config I want to challenge the client for user and password. How do I do this?
0
votes
1answer
87 views

How to do a basic authentication in a functional view in Django?

I want to do a basic authentication on a functional view. The view is expecting a POST request from a client script. So as soon as the client is authenticated, it will POST some new data to the view. ...
0
votes
2answers
48 views

Python urllib2 accesses page without sending authentication details

I was reading urllib2 tutorial wherein it mentions that in order to access a page that requires authentication (e.g. valid username and password), the server first sends an HTTP header with error code ...
0
votes
1answer
246 views

Django basic authentication in functional View

I am looking to apply an Basic Authentication mechanism to the functions in my view functions. I have some view functions that return JSON data via a template. If I visit my app via a webrowser, I ...
0
votes
2answers
205 views

BasicAuth Prompt won't show with Status 401

I don't see a password prompt in IE/Firefox even when I send the 401 status code with Tornado:- import tornado.ioloop import tornado.web class UserHandler(tornado.web.RequestHandler): def ...
0
votes
1answer
166 views

how to add authentication to a wsgiref python web service

I am working on a sample code given in the python documentation, the code is: from wsgiref.simple_server import make_server, demo_app httpd = make_server('', 8000, demo_app) print "Serving HTTP on ...
1
vote
2answers
2k views

HTTP Basic Authentication is failing in python script

I am trying to connect to a REST resource and retrieve the data using Python script (Python 3.2.3). When I run the script I am getting error as HTTP Error 401: Unauthorized. Please note that I am able ...
0
votes
1answer
411 views

Python httplib2 is not working for authenticated resource

I have a resource which is authenticated which requires realm, username and password for authentication. Python's urllib2 has provision to provide realm whereas i did not find any provision for ...
0
votes
1answer
152 views

Selenium stuck loading frame with basic authentication

I'm using selenium in python to check the page of a website that uses basic authentication on one frame. I'm checking to see if the password I am entering is correct or not, so the basic ...
1
vote
2answers
3k views

Basic Auth urllib2 with HTTPPasswordMgrWithDefaultRealm and POST data

I have this cURL call that works perfectly: curl -H 'X-Requested-With: SO demo' -d 'parameter=value' https://username:[email protected]/api/work/ My conversion does not work. import ...
0
votes
1answer
190 views

Does django natively integrate with HTTP Basic Authorization

ONe of my system components is using the Basic HTTP Authrozation ( http://en.wikipedia.org/wiki/Basic_access_authentication ) for log in information. Another part of my system is running a django ...
10
votes
1answer
6k views

How to debug urllib2 request that uses a basic authentication handler

I'm making a request using urllib2 and the HTTPBasicAuthHandler like so: import urllib2 theurl = 'http://someurl.com' username = 'username' password = 'password' passman = ...
1
vote
2answers
2k views

How to check contents of incoming HTTP header request

I'm playing around with some APIs and I'm trying to figure this out. I am making a basic HTTP authenticated request to my server via the API. As part of this request, the authenticated key is stored ...
3
votes
3answers
4k views

Python HTTPS client with basic authentication via proxy

From Python, I would like to retrieve content from a web site via HTTPS with basic authentication. I need the content on disk. I am on an intranet, trusting the HTTPS server. Platform is Python 2.6.2 ...
2
votes
2answers
2k views

HTTP basic authentication using sockets in python

How to connect to a server using basic http auth thru sockets in python .I don't want to use urllib/urllib2 etc as my program does some low level socket I/O operations