Hi Simon,

this is new to me as well, I got it to work using:

curl --data 
"login_email=myname%40gmail.com&login_password=password&submit=Sign+in"
http://www.mydspace.com/password-login

I had some issues first using the --data-urlencode parameter instead of
--data. This also encoded the ampersands which shouldn't have happened to
make it work.

If you debug your query, following bit in the return html is interesting:

<input id="aspect_eperson_PasswordLogin_field_login_email"
class="ds-text-field error" name="login_email" type="text" value="*contents
of your query*" title="The email address and/or password supplied were not
valid." />
<span class="error">* The email address and/or password supplied were not
valid.</span>

because I saw that all my parameters ended up in that field, I realized
there was something wrong with the ampersand encoding.

On a sidenote, if you play around with forms, encoding and parameters,
Tamper Data is a nice little firefox add-on that allows you to see and
tamper with the requests you make & responses you get.

https://addons.mozilla.org/en-us/firefox/addon/tamper-data/

cheers,

Bram

-- 
[image: logo]
*Bram Luyten* *@mire*
*2888 Loker Avenue East, Suite 305, Carlsbad, CA. 92010*
*Esperantolaan 4, Heverlee 3001, Belgium*
  
<http://www.atmire.com/>www.atmire.com<http://atmire.com/website/?q=services&utm_source=emailfooter&utm_medium=email&utm_campaign=braml>


On Wed, Aug 1, 2012 at 6:04 PM, Brown, Simon Contractor, Digital Consulting
Services <scbr...@nps.edu> wrote:

>  We are using DSpace 1.8.2 with the JSPUI admin interface.   I would like
> to log into DSpace using curl (or more precisely RCurl) because I want to
> be able to scrape item IDs (not the handles, but the actual IDs).  My code
> looks something like this:****
>
> ** **
>
> postForm(“dspace/…./password-login”, login_email=”user”,
> login_password=”password”)****
>
> ** **
>
> It basically always returns “The e-mail address and password you supplied
> were not valid”****
>
> ** **
>
> Is it not possible to log in using curl?  If it is possible I’ll figure it
> out eventually, but if it’s not I would rather not spend the time on it.**
> **
>
> ** **
>
> Simon Brown****
>
> Digital Consulting Services****
>
> Supporting the Dudley Knox Library, Naval postgraduate School****
>
> scbr...@nps.edu****
>
> 831.656.3574 Phone****
>
> 831.656.3238 Fax****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to