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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:29:29+00:00 2026-06-04T16:29:29+00:00

I’m working on a module in PHP which uses login authentication from another system

  • 0

I’m working on a module in PHP which uses login authentication from another system and has the following characteristics:

  • Login is done through form submission, which then bases on user login to allows access to different sets of sub-modules based on back-end processing.
  • Page interactions are all done with jQuery. Communications with back-end are all done in Ajax.
  • Submodules include reports and CRUD forms, each requiring access control so for example, 1 department can’t view report A but can view report B while another could view both. Forms are strictly available to certain groups.
  • All AJAX requests return JSON

I could figure out the ACL at the back-end but I’m not sure about securing the AJAX requests.
The best I could come up with is having API key per user, per submodule and checking for user sessions on every requests.

Just to clarify, I can’t touch on the login process because it’s restricted to another system. I could only get cookies and query the other system to verify whether they are logged in or not.

What would you do to harden the AJAX security in a scenario like this?

  • 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-04T16:29:31+00:00Added an answer on June 4, 2026 at 4:29 pm

    I could figure out the ACL at the back-end

    Yes, you can … and must. You can’t trust the client to tell you if the client is allowed to access something.

    but I’m not sure about securing the AJAX requests.

    Ajax requests are just HTTP requests that are made by JavaScript. The only difference when it comes to securing them is that the JavaScript you write must be prepared for a “permission denied” response (so it can display a suitable message to the user).

    The best I could come up with is having API key per user, per submodule and checking for user sessions on every requests.

    Normally you would just use a session to track a user’s log in status and they access level / roles. You say you have access to the cookies, use those.

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

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text

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.