Hi Mikael,

I use the following curl commands to script a login (for 3.2) -- you 
should be able to adapt this to work for your version:

# Pull out the ltValue
ltValue=`curl -k --cookie-jar /tmp/cookieTmp --cookie /tmp/cookieTmp  
https://path/to/cas | sed -n 's/.*<input type=\"hidden\" name=\"lt\" 
value=\"\(.*\)\" \/>.*/\1/p'`

# Submit ltValue, username, password to login page
loginResponse=`curl -k --cookie-jar /tmp/cookieTmp --cookie 
/tmp/cookieTmp  https://path/to/cas -d "username=$CASUSERNAME" -d 
"password=$PASSWORD" -d "_eventId=submit" -d "lt=$ltValue" -L`

# Remove cookie store
rm /tmp/cookieTmp

HTH,

..Sean.

_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas
  • cas monitoring Mikael Kermorgant
    • Re: cas monitoring Sean R. McNamara

Reply via email to