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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:02:53+00:00 2026-06-08T14:02:53+00:00

how to carry out an authentication process for each request sent. The problem i’m

  • 0

how to carry out an authentication process for each request sent. The problem i’m currently facing is i’m not able access user data which is sent as a request param. here is what i have tried

(pre-route[:any "/mainpage/*"] {:keys[data]}
 (when (not(contains? data "userid"))
   //false response
  )
)

and the middleware

(defn for-auth [handler]

  (fn [req]
    (if (contains? (:body (:params req)))
      (handler req)
      (handler (assoc req :body {})
    )
   )
)

and i add the middlware too. but neither of them work.. Any idea to access user params..

Thanks

  • 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-08T14:02:55+00:00Added an answer on June 8, 2026 at 2:02 pm

    Ok here is what i have done and it solves my problem..

    (pre-route [:any "/mainroute/*"] {{:keys [jsondata]}:params}
      (let [data (httputil/parse-json-data jsondata)]
    
      (cond
        (not (true? valid_req)) "false"
        (not (true? version_check)) "false"
        (not (true? user_valid)) "false"
        )
       )
      )
    

    here i have parsed my json data in middleware and added it to “params” with key name :jsondata..
    it works perfectly..

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

Sidebar

Related Questions

Jquery did not carry out!!!I don't know why $(.other-edithion).click(function(){ var city = $(this).closest('#city'); if
I'm using the SqlMembershipProvider to carry out my ASP.NET website's user management. In particular,
The steps I need to carry out are repetitive, but I'm not sure how
Do not you know a method to carry out the following code like php?
I currently trying to carry out the same operation (OCR) on images in android,
I have a web page which allows the user to carry out various operations
Is there anyway to carry out an SQL transaction in one command? eg mysql_query(
How can I basically carry out a unique constraint on a string data-type field.
how to carry out the pivot function i have a table with datas Day
It's known that CF indicates unsigned carry out and OF indicates signed overflow. So

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.