Questions tagged [http-status-code-401]

Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.

The request has not been applied because it lacks valid authentication credentials for the target resource.

The server generating a 401 response MUST send a WWW-Authenticate header field1 containing at least one challenge applicable to the target resource.

If the request included authentication credentials, then the 401 response indicates that authorization has been refused for those credentials. The user agent MAY repeat the request with a new or replaced Authorization header field2. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user agent SHOULD present the enclosed representation to the user, since it usually contains relevant diagnostic information.

See

1109 questions
2
votes
0 answers

AngularJS ResponseError Inspector call refresh token - impementation

Can some one please provide a working sample of AngularJS refresh web token call from Inspector responseError method when get the status code = 401. I tried some of the ways that are given in some forums, but seems to be nothing is working for me.…
user2066540
  • 357
  • 2
  • 5
  • 16
2
votes
3 answers

Jive REST API returning {"code":401,"message":"Bad credentials"} using Basic Auth

This may not be specific to the Jive API, but to basic auth in general. This is NOT a federated account. I'm attempting a simple request to the Jive REST API v3 with cURL: curl --include --verbose --user {USERNAME}:{PASSWORD}…
2
votes
1 answer

Guzzle Losing Digest Auth with Sequential Requests

I'm having some problems to send consecutive request with digest auth. Only the first one is working as expected, the second one throw Request Exception with status code 401 (Unauthorized) , that means guzzle is losing credentials after first…
2
votes
1 answer

Android koush ion library catch 401 error

I'm using Koush Ion on Android to handle net operations. I'd like to add a common handler to handle 401 unauthorized error. How i can do it? thank you
Premier
  • 4,160
  • 6
  • 44
  • 58
2
votes
1 answer

Making request to LinkedIn API results in 401

I am trying to make an API to à LinkedIn users profile using PHP. I've successfully registered my application and I've noted my API and Secret Key as well as listing my redirect url. The user starts on this page: index.php. This page contains a link…
Javacadabra
  • 5,578
  • 15
  • 84
  • 152
2
votes
4 answers

Angularjs handling 401 Errors application wide

I am struggling a little bit with handling 401 errors application wide. Some other posts where not really helping me: Angularjs - handling 401's for entire app 401 unauthorized error handling in AngularJS I have to send an authentication token, if…
Dukeatcoding
  • 1,363
  • 2
  • 20
  • 34
2
votes
1 answer

Python problems with FancyURLopener, 401, and "Connection: close"

I'm new to Python, so forgive me if I am missing something obvious. I am using urllib.FancyURLopener to retrieve a web document. It works fine when authentication is disabled on the web server, but fails when authentication is enabled. My guess is…
Martin Del Vecchio
  • 3,558
  • 2
  • 27
  • 36
2
votes
1 answer

MVC application on local IIS cannot communicate with other application on same local IIS

I have two applications running on my webserver. The webserver is run locally by me on my computer. The web server is running IIS 7.5 I have two applications. One is a WCF and the other is a MVC application. The MVC application is asking the WCF…
Jens Bergvall
  • 1,617
  • 2
  • 24
  • 54
2
votes
1 answer

Having SQL injection like text in a texbox results in 401.1 on Submit

This is a follow up to my post back in August: Asks for AD credentials / "Connection Interrupted" on Postback The issue popped up again for a new record and I have determined that the offending text is "... Sharepoint site[semi-colon] update team…
weffey
  • 107
  • 1
  • 7
2
votes
0 answers

Nginx+uwsgi do not give content when post got a 401

I am using python and just build an API Server on django. And I wrote a script using urllib2 to access this server. To access this API, request must have basic-auth information. If authorize failed, API give a response that code is 401. This…
00000100
  • 21
  • 4
2
votes
2 answers

How to setup apache redirect or custom 401 document on Kerberos SSO login failure

I have a working Kerberos SSO setup, I use apache and jboss with mod_jk. Apache is protecting (by kerberos) the auto-login.htm page with the following configuration: AuthType Kerberos AuthName …
2
votes
1 answer

Twitter API returns 401 in ColdFusion

we're trying to use ColdFusion 9 to post an update to Twitter via its API v. 1.1, but despite everything looking like it should work, we continue to get 401 "Unauthorized" errors. Any help would be most appreciated! Looking back through previous…
2
votes
3 answers

Handle non standard 401 headers with machanize

I am trying to automate login to this page http://portal.globaltransit.net/ the thing is the page return a 401 header when you first reach the page but does not show standerd bassic http auth page rather a http form. Here is the output of curl -vvv…
nashr rafeeg
  • 779
  • 3
  • 12
  • 31
2
votes
0 answers

VS2012 Web project runs in VS Dev Server, but not in IIS

I have an MVC v3 project I've inherited. (I'm not that familiar with web stuff.) The project runs fine in Debug mode using the Visual Studio Development Server. However, whenever I try to run it via IIS locally, it fails with 401.0 Unauthorized.…
2
votes
0 answers

XMLHttpRequest on Phonegap - unauthorized 401 Error, but correct login data?

I'm just trying to get a XMLHttpRequest running in Phonegap, but it doesn't work. An alert told me, that I'm getting back an 401 status. As I already found out, this error means, that I'm not authorized to get the information. In a browser on my…
Fabi
  • 274
  • 4
  • 15