Hi there,
I am writing java code to simulate login to CAS protected web app., so that our QA automation team can use that to test apps protected by CAS, without manually login to CAS over and over.
I have carefully preserved the cookie and tickets values in each calls as browser would., but when my code calls the /cas/login endpoint to authenticate user credential, I always gets error:
You cannot attempt to re-submit a form that has been submitted already.
On server side, it says: invalid login ticket, even though the ticket is indeed valid.
what is the purpose of the following check in AuthenticationViaFormAction?
protected boolean checkLoginTicketIfExists(final RequestContext context) {
final String loginTicketFromFlowScope = WebUtils.getLoginTicketFromFlowScope(context);
final String loginTicketFromRequest = WebUtils.getLoginTicketFromRequest(context);
Thanks,
Yan