Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7497133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:56:53+00:00 2026-05-29T18:56:53+00:00

An authentication service allows user accounts be disabled (a sort of soft-delete). If the

  • 0

An authentication service allows user accounts be disabled (a sort of soft-delete).

If the server then receives an authentication request for a disabled user that would otherwise be valid, should the server return 401 or 403? With either status code, I would return a message indicating that the account had been disabled.

For quick reference, relevant quotes from HTTP/1.1 spec (emphasis mine):

401 Unauthorized

The request requires user authentication. The response MUST include a
WWW-Authenticate header field (section 14.47) containing a challenge
applicable to the requested resource. The client MAY repeat the
request
with a suitable Authorization header field (section 14.8). If
the request already included Authorization credentials
, then the 401
response indicates that authorization has been refused for those
credentials
. 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 SHOULD be presented the
entity that was given in the response
, since that entity might
include relevant diagnostic information. HTTP access authentication
is explained in "HTTP Authentication: Basic and Digest Access
Authentication" [43].

403 Forbidden

The server understood the request, but is refusing to fulfill it.
Authorization will not help and the request SHOULD NOT be repeated.
If the request method was not HEAD and the server wishes to make
public why the request has not been fulfilled, it SHOULD describe the
reason for the refusal in the entity
. If the server does not wish to
make this information available to the client, the status code 404
(Not Found) can be used instead.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T18:56:59+00:00Added an answer on May 29, 2026 at 6:56 pm

    Based on an email written by Roy T. Fielding, there’s apparently a bug in the current HTTP spec.

    The way the spec is intended to be read is as follows (using quotes from above email):

    401 “Unauthenticated”:

    you can’t do this because you haven’t authenticated

    403 “Unauthorized”:

    user agent sent valid credentials but doesn’t have access

    So, in the case of a disabled user, 403 is the correct response (and 404 is also an option).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using smart card to authenticate the user. I have a authentication service
I have the following bean defined: <sec:authentication-manager alias=authenticationManager> <sec:authentication-provider user-service-ref=userDetailsService /> </sec:authentication-manager> I guess
I have implemented a web service with server and client authentication using keytool. The
I got a web service that I protect with basic authentication and use ssl.
I want to call a web service that requires an authentication cookie. I have
We have created a WCF service hosted in a windows service that handles Authentication
I have a webservice that's behind form's authentication. The site that hosts the service
On Windows it is possible to have a service that allows clients running in
I have a C# web application that (in some configurations) allows the user to
I'm writing a WCF service with some authentication and a custom error handler. However,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.