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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:18:23+00:00 2026-05-16T07:18:23+00:00

I wonder what is the optimal authentication method for services and webservices: user/password is

  • 0

I wonder what is the optimal authentication method for services and webservices:

  1. user/password is sent on each request
  2. user/password is sent once to obtain an authentication code that will be sent on each request

Is there any alternative? Which is better? Why?

  • 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-16T07:18:24+00:00Added an answer on May 16, 2026 at 7:18 am

    Depends on the protocol.

    If the service requests are in the clear (http), then you might want to consider a secure (https) logon transaction, which gains you a limited-time token to authorise future requests (a session cookie, in effect). Then at least eavesdroppers don’t get credentials that work forever, just for a limited period.

    Likewise even if the logon transaction isn’t secure, at least if it only happens once it’s slightly harder to eavesdrop. It’s also slightly harder to use.

    If you don’t care about security, I wouldn’t even use a username/password, just an API key. Amounts to the same thing, but if the user doesn’t choose it then at least it won’t be similar to any of their other passwords, so it doesn’t affect anything else when it’s stolen.

    If you care about security sufficiently that everything is done over https, then it doesn’t really make a lot of difference what identification mechanism you use, AFAIK. So do something simple.

    Finally, you might care about the security of the authentication, but not about the secrecy of the requests themselves. So, you don’t mind eavesdroppers seeing the data in flight, you just don’t want them to be able to issue requests of their own (or spoof responses). In that case, you could sign the requests (and responses) using a public/private keypair or a shared secret with HMAC. That might (or might not) be easier to set up and lower bandwidth than SSL. Beware replay attacks.

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

Sidebar

Related Questions

I wonder what the time complexity of the pop method of list objects is
I wonder if anyone knows the (optimal?) algorithm for longest recurring non-overlapping sub string.
What is the optimal query to obtain all the records for one specific day?
I'm working on a calendar page that allows a user to click on a
I wonder why this code never runs when I release a key. private void
I wonder what's the algorithm of make_heap in in C++ such that the complexity
I wonder whether it's possible to access a method declared in a parent class,
I wonder if it's possible to quit my program entirely after the user presses
I user Autofac and wonder if it is possible to come around the DependencyResolutionException
I wonder if it is possible to implement a GUI panel (possibly JPanel) that

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.