Recent

Author Topic: [SOLVED] HTTP Authentication  (Read 1422 times)

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 836
    • Lebeau Software
Re: HTTP Authentication
« Reply #30 on: October 13, 2020, 06:18:32 pm »
OK. I get a HTTP 200. Getting close.

1. How do I know I am logged in?

For webform-based logins, you have to look at the content that is being sent back, you can't rely on the HTTP response code alone.  The 200 simply means the HTTP request itself was successful, but the webform operation may have failed.  The content could be an error message, or even the login webform again.

Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

rvk

  • Hero Member
  • *****
  • Posts: 4384
Re: HTTP Authentication
« Reply #31 on: October 13, 2020, 06:26:17 pm »
For webform-based logins, you have to look at the content that is being sent back, you can't rely on the HTTP response code alone.  The 200 simply means the HTTP request itself was successful, but the webform operation may have failed.  The content could be an error message, or even the login webform again.
Yes, you're connect. I wanted to change my example to check the json-result of the login, to see if it contained the newtoken (or something) but didn't get to it. For the old forum you would need to check the html itself.

pcurtis

  • Sr. Member
  • ****
  • Posts: 351
Re: HTTP Authentication
« Reply #32 on: October 14, 2020, 04:55:39 am »
Bingo! - I've done it.

Thank you rvk for your help.
Windows 10 / Linux Mint 20
Laz 2.10.0
FPC 3.2.0

 

TinyPortal © 2005-2018