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
3
votes
3 answers

Why is my sign_in.json returning a 401 status? (AngularJS + Rails tutorial on Thinkster)

I've been following the AngularJS Tutorial for Rails on Thinkster and right now I'm nearly at the end of User Authentication with Devise. The app seems to run properly on my local server, but when I look at the console I always see the message:…
3
votes
1 answer

ASP.NET MVC 5 [Authorize] attribute is generating login pop-up in browser instead of redirecting to 302 login page

I've never seen this happen before: I've decorated a controller with an [Authorize (Roles = "Admin"]attribute, but instead of sending unregistered/un-signed users to the Login View via 302 redirect, a javascript-generated sign-in prompt appears in…
3
votes
2 answers

Uncaught Error: [$injector:cdep] use ngdialog in factory

I want to use ngdialog to do with the 401 status, but I get the error:Uncaught Error: [$injector:cdep] angular.module('ws.site.master', [ 'ngResource', 'ngCookies', 'ngSanitize', 'ngAnimate', 'ui.router', …
wu.wu
  • 31
  • 2
3
votes
1 answer

Coldfusion Vimeo oAuth

I am trying to figure out the oAuth process using coldfusion and there doesn't seem to be a lot of information on the forums. I keep getting “401 Unauthorized - Invalid signature - The oauth_signature passed was not valid” But I am passing the…
ozatomic
  • 182
  • 1
  • 13
3
votes
1 answer

WebDAV return 401 - How to authenticate?

I have a problem with WebDAV. I have to get a list of files. I have this request: SELECT "DAV:displayname" FROM "address" WHERE "DAV:ishidden" = false AND "DAV:isfolder" = false…
miosz
  • 143
  • 1
  • 4
  • 13
3
votes
3 answers

Responding Globally to a 401 in Polymer

Using Polymer 1.0, I am looking for the best approach to showing a login to a user when the app receives a 401 from the app services. Using Angular I would be looking at using a httpInterceptor to do this, is there an equivalent in Polymer? Here's…
3
votes
2 answers

How to handle the 401 Error response using C#?

I have a API which returns the json response. When I call the API from Fiddler it gives me the json reponse as shown below: JSON Response: Call to API from Web page: protected void FinalCall() { // try // { string…
SHEKHAR SHETE
  • 5,964
  • 15
  • 85
  • 143
3
votes
1 answer

Why do I get error 401 when I query items of user?

In the StrongLoop API Explorer I have the option to query: /People/{id}/food_prefs Person is based on the built in User model. This query should return a JSON list of all the food_prefs for that Person (User). Instead I get a 401 error about…
3
votes
0 answers

How to avoid server error 401 (and 403) while using boilerpipe?

I use BoilerPipe for Java to extract some articles from the internet. It works in a lot of sites, but in several sites I get a Http 401 server error, when I don't need any authentication in my web browser... Here's an example of site which returns…
Malik
  • 207
  • 1
  • 2
  • 14
3
votes
2 answers

mgtwitterengine and oauth 401 error: Boggled

OK... so here is my code: twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self]; [twitterEngine setConsumerKey:CONSUMER_KEY secret:CONSUMER_SECRET]; accessToken = [twitterEngine…
Jason Reeves
  • 1,716
  • 1
  • 10
  • 13
3
votes
4 answers

401 Unauthorized using oauth with twitter on iPhone

I use Twitter-OAuth-iPhone. When I try to login on twitter with SA_OAuthTwitterEngine, I received an error 401 I received the delegate call for: - (void) OAuthTwitterController: (SA_OAuthTwitterController *) controller authenticatedWithUsername:…
menkel
  • 83
  • 1
  • 2
  • 7
3
votes
1 answer

C# WebClient HTTP Basic Authentication Failing 401 with Correct Credentials

I'm trying to automate configuring a wireless router's SSID and Password via c# webclient. The router has no API that I know of. It's an unbranded chinese router. The web config seems to be the only option for configuration. It uses…
3
votes
2 answers

Authorization has been denied for this request

I have created a webapi with Basic OAuth and a mobile app using ajax to access the api. I set the AccessTokenExpireTimeSpan to be 1 day as coded below. static Startup() { PublicClientId = "self"; UserManagerFactory = () => new…
3
votes
1 answer

HTTP status if re-authentication is required

Which status code would you use in this scenario, assuming you're using a token based authentication: The client has a token and makes a request to the server. The token expired and the server sends a 401 Unauthorized. The client sends the refresh…
3
votes
1 answer

I am getting a 401 Unauthorized from Node.js, Restify and Passport

I am getting a 401 even though all my console logs are printing... Here is my server code: var Datastore = require('nedb'); var db = new Datastore({ filename : 'datafile.db', autoload : true }); var restify =…
Ray Hulha
  • 10,701
  • 5
  • 53
  • 53