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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:20:58+00:00 2026-06-15T10:20:58+00:00

I am a beginner web-developer and I have some doubts about the security of

  • 0

I am a beginner web-developer and I have some doubts about the security of an API that I developed. It’s a simple web-service that requires authentication in order to access/modify data.

I am wondering what are the best practices for authenticating users via HTTP.

Currently my app works like this:

User authenticates through an API request (POST) which requires the username and the password. The response contains info about the user and a TOKEN which will be used in the future for further requests.

My concerns: I don’t know if the auth request should be POST. It sounds more like a GET, because POST should create something (at least this is the convention in Ruby on Rails). And then, even with POST or GET, the information is still “visible” during the transfer of the information. I heard something about HTTPS – how does that solves the problem?

The token is generated at user creation time – and remains the same in time. Is this bad? Should the token be generated again after a “logout”? I’ve seen APIs that use an API_KEY along a token for authentication. How does that work?

I have some GET requests to retrieve information about something. With this request I pass as an parameter the token retrieved from the authentication request. Is this ok? I mean that token is sensitive information.

Where can I find more information about these concerns of mine (book, article, w/e)?

  • 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-06-15T10:20:59+00:00Added an answer on June 15, 2026 at 10:20 am

    HTTPs encrypts all traffic to your web site, and so would hide any get and post requests. It requires you to purchase an HTTPS certificate (which are cheap), and get a non-shared IP to host on (not so cheap). (If anyone talks about self signed certificates – well, it’s possible, but ill advised if external people want to talk to your service).

    Having a long lasting login token can be bad, it depends what sort of non-repudiation you want. If someone can log in 2 years ago, and continue using a token how do you know it’s still the original requestor? Tokens should expire and have a way to re-request.

    API keys generally work on a shared secret which is swapped out of band (by getting it from the hoster’s web site generally). A custom authentication scheme and header is used, and must be calculated and checked for each request. This doesn’t require HTTPS – the shared secret is used to generate the authentication header, but isn’t sent with it, so the secret doesn’t travel with each request. Of course you need to write this code, and figure out what you want the process to be. I’d generally avoid this unless you know what you’re doing – you need to take a canonical representation of the request, sign it, then use that as the header. It’s not complicated, but it’s not simple either.

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

Sidebar

Related Questions

I am a beginner in web programming and have some very simple questions. I'm
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later
I am a beginner web developer and i have a site JammuLinks.com , it
I am beginner java web developer, now my question is after i developed my
I'm absolute beginner in web technologies. I know that my question is very simple,
NOTE: I'm a beginner web developer, somewhat familiar with PHP. I've been curious about
I am a beginner ROR web developer, I have google charts running on my
I'm a beginner with Zend. I have a little web site in which I
Beginner in Android development. My code crashes. I have made a simple Java method
I am beginner in web development, I am developing a site that allows user

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.