Skip to main content

[ot] form authentication with CURL

No replies

sorry the off-topic, but I need that to test my jersey application

I have this JDBC realm configured in my Glassfish, originally used by
a form based authentication of another application:

and now I am trying to call the secure resource with CURL:

This two command works:

curl -c cookies.txt -d "j_username=fgaucho&j_password=test"
curl -v -b cookies.txt -X GET

Then, I configured the same JDBC realm in my Jersey web-service
descriptors (web.xml and sun-application.xml), but I can't make it

curl -c cookies.txt -d "j_username=fgaucho&j_password=test"
curl -v -b cookies.txt -H "Content-Type:application/xml" -H
"Accept:application/json" -X PUT --data-binary @5.xml

5.xml has an XML with the serialized object ..

disablign security and using curl, it works..

any hint about CURL and form based authentication would be helpful......

To unsubscribe, e-mail:
For additional commands, e-mail: