Hi Michael, thank you for the anwser. Now it works.
Kosmas Am 08.11.2021 um 11:22 schrieb Michael Plate: > Hi Kosmas, > > Am 08.11.21 um 08:48 schrieb Kosmas Kaifel: >> Good morning, >> >> can someone give me an example, how can I login into the REST-API via >> curl. > […] > > tried upgrading our DSpace5 last Friday and tested the login to the API: > > > curl -c - -XGET https://<YOUR-SERVER>/server/api/login > > You will get a Cookie named "DSPACE-XSRF-COOKIE" and its value. > > Now try > > curl -i -b "DSPACE-XSRF-COOKIE=<YOUR-COOKIE>" -H "X-XSRF-TOKEN: > <YOUR-COOKIE>" -XPOST https://<YOUR-SERVER>/server/api/authn/login -d > 'user=YOUR-USER&password=YOUR-PASSWORD' > > In the answer you will receive a new DSPACE-XSRF-TOKEN and a Bearer > Token you need for further access. > > > https://wiki.lyrasis.org/display/DSPACE/REST+Authentication > https://github.com/DSpace/RestContract/blob/main/csrf-tokens.md > > CU > > Michael > -- +---------------------------------------------------------------+ Universität Ulm Kommunikations- und Informationszentrum (kiz) Abt. Informationsmedien Albert-Einstein-Allee 37 89081 Ulm Tel. 0731/50-15495 EMail: [email protected] +----------------------------------------------------------------+ -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/4ce93a15-c3de-da74-5df2-18c8d08cc3d3%40uni-ulm.de.
