HTTP authentication is a method for a HTTP user agent to provide a user name and a certain proof confirming the user's identity when making a request. Various proofs define different HTTP Authentication methods, e.g. basic, forms, digest, or others.
Questions tagged [http-authentication]
622 questions
581
votes
14 answers
How to set the authorization header using cURL
How do I pass authorization header using cURL? ( executable in /usr/bin/curl).

Vidya
- 7,717
- 12
- 48
- 75
164
votes
10 answers
Basic HTTP authentication with Node and Express 4
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…

Dov
- 15,530
- 13
- 76
- 177
147
votes
4 answers
CURL to access a page that requires a login from a different page
I have 2 pages: xyz.example/a and xyz.example/b. I can only access xyz.example/b if and only if I login to xyz.example/a first. If accessing xyz.example/b without going through the other, I simply get access denied (no redirect to login) via the…

ms1013
- 1,725
- 2
- 14
- 16
93
votes
12 answers
How can I suppress the browser's authentication dialog?
My web application has a login page that submits authentication credentials via an AJAX call. If the user enters the correct username and password, everything is fine, but if not, the following happens:
The web server determines that although the…

dgvid
- 26,293
- 5
- 40
- 57
76
votes
7 answers
Rails/Rspec Make tests pass with http basic authentication
Here's my http basic authentication in the application controller file (application_controller.rb)
before_filter :authenticate
protected
def authenticate
authenticate_or_request_with_http_basic do |username, password|
username == "username"…

benoitr
- 6,025
- 7
- 42
- 67
73
votes
6 answers
How to do HTTP authentication in android?
I am checking out the class org.apache.http.auth.
Any more reference or example if anyone has?

Bohemian
- 5,957
- 11
- 38
- 47
60
votes
6 answers
Using Basic HTTP access authentication in Django testing framework
For some of my Django views I've created a decorator that performs Basic HTTP access authentication. However, while writing test cases in Django, it took me a while to work out how to authenticate to the view. Here's how I did it. I hope somebody…

Humphrey
- 4,108
- 2
- 28
- 27
54
votes
8 answers
PHP_AUTH_USER not set?
For some reason, none of the code within
if (isset($_SERVER['PHP_AUTH_USER']) &&
isset($_SERVER['PHP_AUTH_PW']))
{
// When the above is set, the code that is here will execute of course
}
is being executed for me. When I enter the correct…

Newbie_25
- 837
- 1
- 9
- 17
54
votes
2 answers
How can I get the authenticated user name under Apache using plain HTTP authentication and PHP?
First, let's get the security considerations out of the way. I'm using simple authentication under Apache for a one-off, internal use only, non-internet connected LAN, PHP web app.
How can get I the HTTP authenticated user name in PHP?

basszero
- 29,624
- 9
- 57
- 79
54
votes
11 answers
JMeter Basic Authentication
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.…

Depy
- 549
- 1
- 4
- 5
53
votes
1 answer
HTTP basic authentication URL with "@" in password
I'm trying to set up some selenium tests to our staging server using Sauce Labs. It's behind a basic http auth, so theoretically I could set the selenium URL to http://user:password@www.stagesite.com. However, the password contains a "@", causing…

jraede
- 6,846
- 5
- 29
- 32
45
votes
3 answers
AFNetworking 2.0 and HTTP Basic Authentication
Can't find AFHTTPClient on AFNetworking 2.0, to use:
AFHTTPClient *client = [AFHTTPClient clientWithBaseURL:[NSURL URLWithString:@"http://examplewebsite.com]];
[client setAuthorizationHeaderWithUsername:@"username" password:@"password"];
How it…

Marckaraujo
- 7,422
- 11
- 59
- 97
44
votes
7 answers
Can I use HTTP Basic Authentication with Django?
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…

David Webb
- 190,537
- 57
- 313
- 299
41
votes
2 answers
Authentication issues with WWW-Authenticate: Negotiate
I am trying to access a site that is password protected. It is not using basic authentication (even though the same user/pass box pops up in firefox) as the response header is WWW-Authenticate: Negotiate.
I want to automate the login process by…

fire
- 21,383
- 17
- 79
- 114
33
votes
2 answers
Standard 401 response when using HTTP auth in flask
In flask, I'm using the following snippet to enable HTTP auth:
def authenticate():
return Response('', 401, {'WWW-Authenticate':'Basic realm="Login Required"'})
Now, in my past experience with Flask, if…

ingh.am
- 25,981
- 43
- 130
- 177