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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:51:07+00:00 2026-05-24T15:51:07+00:00

This is probably the MOST basic question and for some reason but I’m a

  • 0

This is probably the MOST basic question and for some reason but I’m a bit dumbfounded. I am designing a restful service which has multiple pages. Clicking on a link by default fires an HTTP GET

Now how do I send authorization data with the get request? Should it be part of url? I’ll be forced to create an ugly url with encrypted query parameters. Is there any way to avoid this?

Is there something in javascript/jquery that could just send this data ‘under the hood’, so to speak?

in JQuery the $.ajax method takes username, password as arguments so that authorization data can be sent along with the ajax call. Anything equivalent for non-ajax calls or am I left with the URL only?

Reason for this approach:

  • I want the user to be able to click the ‘back button’ and go back to the previous page. If I did a $.get with the authorization, and followed it with $('html').replaceWith(result) it would disable the back button, correct? (i.e., not show anything)

This should probably be a REST 101 but for some reason it’s had me cornered

(FYI: Technologies: Jquery/javascript/Restlet/Freemarker)

(PS: Cookies as last resort. Or are they the best way? 🙂

  • 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-24T15:51:08+00:00Added an answer on May 24, 2026 at 3:51 pm

    With GET requests, you are limited to the Request headers and the query string/url of your request. You can use an HMAC approach or OAUTH, where each request is ‘signed’. If you are doing this purely client side, there is the problem of the shared-secret no longer being, well, secret.

    Of course, it sounds like you are already making POST requests using the username and password (which I highly discourage, BTW)

    If you’re wanting examples of HMAC in action, I believe Amazon does (or did) use HMAC for interacting with S3, so there are a lot of sample code around.

    Ultimately, it is very difficult to have the web-client do stateless authentication without disclosing some ‘secret’ information, such as passwords or private keys/tokens. You could issue temporary tokens to the user that are then backed up by validating that the request headers (IP address, etc) are consistent through the life of the token. If you’re disclosing temporary tokens to the client, you’ll probably want your authentication mechanism to include a unique nonce per request, as well.

    Purely stateless RESTful authentication is non-trivial if you want the web-client to be doing the requests, so I wouldn’t call it REST 101 🙂

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

Sidebar

Related Questions

this is probably the most basic question in the world, but I cannot figure
This is probably seriously easy to solve for most of you but I cannot
this c# code is probably not the most efficient but gets what I want
i am sure this is quite a numb question to ask and most probably
Am not sure if this question makes sense. But I know all the basic
I am very new to Rails so this will probably seem basic to most
Probably a silly question, but I'm new to all this. I am creating a
This is probably the most classic database problem. I have an E-commerce software solution
This is probably one of the most common tasks / problems when programming; You
This probably has a simple answer, but I must not have had enough coffee

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.