Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Logon to Orion with curl

Hi,

great, now it works.I can authenticate to orion and use the REST API from a script. The solution was to sent the login request to http://localhost:8080/login/form and to remove all extra headers. The following commands list all workspaces for a user:

curl -c cookies.txt -d 'login=user' -d 'password=user' http://localhost:8080/login/form
curl -b cookies.txt http://localhost:8080/workspace

By the way: If I specify wrong credentials I don't get a 401 but a 302. But that's ok as correct credentials lead to a 200 OK and I can differentiate between success and failure.

Ciao
  Chris

Back to the top