Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting csrf token to log in
#1
Running a load test on a web portal (Liferay) using Locust but cannot log in. I am posting the username and password, but need the csrf token. I can inspect the page and see in the response that it is assigning a csrf token as "Liferay.authToken" but have no clue how to grab that. When posting the data to log in, it needs the token (the page calls it p_auth).

Here is a similar fix for this but it's not working for me, maybe because the token is called something different on my page: stefanoapostolico.com/2014/12/07/hande-csrf-token-in-locust-test.html

Any help would be appreciated!
Reply


Messages In This Thread
Getting csrf token to log in - by spartanvfl - May-17-2017, 10:50 PM
RE: Getting csrf token to log in - by nilamo - May-26-2017, 06:42 PM
RE: Getting csrf token to log in - by snippsat - May-27-2017, 06:37 AM
RE: Getting csrf token to log in - by apenn - May-18-2018, 06:24 PM
RE: Getting csrf token to log in - by NSearch - Aug-08-2019, 08:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  passing token to requests alejandroot 4 3,143 Mar-12-2021, 04:49 PM
Last Post: alejandroot
Photo [Solved] How do I position 'token' in JavaScript in search box? cheers100 1 1,907 Nov-21-2020, 01:23 PM
Last Post: cheers100
  The CSRF session token is missing. randiaz 0 3,046 Jul-31-2020, 08:45 PM
Last Post: randiaz
  Token and auth-token hshivaraj 1 2,878 Jul-26-2019, 07:40 AM
Last Post: fishhook

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020