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

  • Home
  • SEARCH
  • 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 9030577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:31:30+00:00 2026-06-16T07:31:30+00:00

I am creating a REST api, closely following apigee suggestions, using nouns not verbs,

  • 0

I am creating a REST api, closely following apigee suggestions, using nouns not verbs, api version baked into the url, two api paths per collection, GET POST PUT DELETE usage, etc.

I am working on the login system, but unsure of the proper REST way to login users. I am not working on security at this point, just the login pattern or flow. (Later we will be adding 2 step oAuth, with an HMAC, etc)

Possible Options

  • A POST to something like https://api...com/v1/login.json
  • A PUT to something like https://api...com/v1/users.json
  • Something I have not though of…

What is the proper REST style for logging in users?

  • 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-16T07:31:32+00:00Added an answer on June 16, 2026 at 7:31 am

    Principled Design of the Modern Web Architecture by Roy T. Fielding and Richard N. Taylor, i.e. sequence of works from all REST terminology came from, contains definition of client-server interaction:

    All REST interactions are stateless. That is, each request contains
    all of the information necessary for a connector to understand the
    request, independent of any requests that may have preceded it
    .

    This restriction accomplishes four functions, 1st and 3rd are important in this particular case:

    • 1st: it removes any need for the connectors to retain application state
      between requests
      , thus reducing consumption of physical resources
      and improving scalability;
    • 3rd: it allows an intermediary to view and understand a request in isolation,
      which may be necessary when services are dynamically rearranged;

    And now lets go back to your security case. Every single request should contains all required information, and authorization/authentication is not an exception. How to achieve this? Literally send all required information over wires with every request.

    One of examples how to archeive this is hash-based message authentication code or HMAC. In practice this means adding a hash code of current message to every request. Hash code calculated by cryptographic hash function in combination with a secret cryptographic key. Cryptographic hash function is either predefined or part of code-on-demand REST conception (for example JavaScript). Secret cryptographic key should be provided by server to client as resource, and client uses it to calculate hash code for every request.

    There are a lot of examples of HMAC implementations, but I’d like you to pay attention to the following three:

    • Authenticating REST Requests for Amazon Simple Storage Service (Amazon S3)
    • Answer by Mauriceless on quiestion: “How to implement HMAC Authentication in a RESTful WCF API”
    • crypto-js: JavaScript implementations of standard and secure cryptographic algorithms

    How it works in practice

    If client knows the secret key, then it’s ready to operate with resources. Otherwise he will be temporarily redirected (status code 307 Temporary Redirect) to authorize and to get secret key, and then redirected back to the original resource. In this case there is no need to know beforehand (i.e. hardcode somewhere) what the URL to authorize the client is, and it possible to adjust this schema with time.

    Hope this will helps you to find the proper solution!

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

Sidebar

Related Questions

I'm creating REST service using ASP.NET Web API. How can I return 401 status
I am creating a REST Web Service using Java and Jersey API. The basic
I'm using the new django-rest-framework 2.0 and have been following the tutorial for creating
I am creating a REST API in rails. I'm using RSpec. I'd like to
I am creating a rest api using yii framework so the basic output format
Background: I am creating a REST api, that will require users to use only
I am in need of creating a rest api for syncing data with my
I'm using c# to interact with a database that has an exposed REST API.
I'm creating a test case for a REST API in soapUI 4.5 where I'm
I am creating REST based APIs for an app using Tastypie with Django. The

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.