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 124427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:59:55+00:00 2026-05-11T04:59:55+00:00

Disclaimer: I’m new to the REST school of thought, and I’m trying to wrap

  • 0

Disclaimer: I’m new to the REST school of thought, and I’m trying to wrap my mind around it.

So, I’m reading this page, Common REST Mistakes, and I’ve found I’m completely baffled by the section on sessions being irrelevant. This is what the page says:

There should be no need for a client to ‘login’ or ‘start a connection.’ HTTP authentication is done automatically on every message. Client applications are consumers of resources, not services. Therefore there is nothing to log in to! Let’s say that you are booking a flight on a REST web service. You don’t create a new ‘session’ connection to the service. Rather you ask the ‘itinerary creator object’ to create you a new itinerary. You can start filling in the blanks but then get some totally different component elsewhere on the web to fill in some other blanks. There is no session so there is no problem of migrating session state between clients. There is also no issue of ‘session affinity’ in the server (though there are still load balancing issues to continue).

Okay, I get that HTTP authentication is done automatically on every message – but how? Is the username/password sent with every request? Doesn’t that just increase attack surface area? I feel like I’m missing part of the puzzle.

Would it be bad to have a REST service, say, /session, that accepts a GET request, where you’d pass in a username/password as part of the request, and returns a session token if the authentication was successful, that could be then passed along with subsequent requests? Does that make sense from a REST point of view, or is that missing the point?

  • 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. 2026-05-11T04:59:55+00:00Added an answer on May 11, 2026 at 4:59 am

    To be RESTful, each HTTP request should carry enough information by itself for its recipient to process it to be in complete harmony with the stateless nature of HTTP.

    Okay, I get that HTTP authentication is done automatically on every message – but how?

    Yes, the username and password is sent with every request. The common methods to do so are basic access authentication and digest access authentication. And yes, an eavesdropper can capture the user’s credentials. One would thus encrypt all data sent and received using Transport Layer Security (TLS).

    Would it be bad to have a REST service, say, /session, that accepts a GET request, where you’d pass in a username/password as part of the request, and returns a session token if the authentication was successful, that could be then passed along with subsequent requests? Does that make sense from a REST point of view, or is that missing the point?

    This would not be RESTful since it carries state but it is however quite common since it’s a convenience for users; a user does not have to login each time.

    What you describe in a ‘session token’ is commonly referred to as a login cookie. For instance, if you try to login to your Yahoo! account there’s a checkbox that says ‘keep me logged in for 2 weeks’. This is essentially saying (in your words) ‘keep my session token alive for 2 weeks if I login successfully.’ Web browsers will send such login cookies (and possibly others) with each HTTP request you ask it to make for you.

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

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer $('.ui-datepicker').draggable() does not work? May 11, 2026 at 2:01 pm
  • added an answer In a lot of scenarios, procedural programming is just fine.… May 11, 2026 at 2:01 pm
  • added an answer try this, i assume your Enabled/Disabled is a bit value… May 11, 2026 at 2:01 pm

Related Questions

Disclaimer: I'm stuck on TFS and I hate it. My source control structure looks
Disclaimer: I'm fairly new to python! If I want all the lines of a
Full disclaimer: I'm a CS student, and this question is related to a recently
DISCLAIMER: The following code is not something I would ever use in a real
Disclaimer Yes, I am fully aware that what I am asking about is totally
Disclaimer: I'm new to the REST school of thought, and I'm trying to wrap
Disclaimer: I did check other questions that seemed related, but this one is much

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.