similar to AEROGEAR-1095 - the Auth-Token does not work on the TODO-APP. Perhaps a library bug ? Not sure, for now creating a bug against the TODO DEMO

Do the login (works fine

curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8080/todo-server/auth/login -d 
'{"username":"john","password":"123"}'
* About to connect() to localhost port 8080 (#0)
*   Trying ::1...
* Connection refused
*   Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /todo-server/auth/login HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:8080
> Accept: application/json
> Content-type: application/json
> Content-Length: 36
> 
* upload completely sent off: 36 out of 36 bytes
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=pIy5j1NZAEDDnBVKPwIuGYhM.undefined; Path=/todo-server
< Auth-Token: bd79166e-9726-4c19-b72b-037984c75561
< Content-Type: application/json;charset=UTF-8
< Content-Length: 46
< Date: Fri, 12 Apr 2013 12:07:20 GMT
< 
* Connection #0 to host localhost left intact
{"username":"john","roles":["admin","simple"]}* Closing connection #0

Now try to use the TOKEN to access an endpoint, using CURL:

 curl -v -H "Accept: application/json" -H "Content-type: application/json" --header "Auth-Token: bd79166e-9726-4c19-b72b-037984c75561" -X GET http://localhost:8080/todo-server/tags

but I am getting a 401

* About to connect() to localhost port 8080 (#0)
*   Trying ::1...
* Connection refused
*   Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /todo-server/tags HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:8080
> Accept: application/json
> Content-type: application/json
> Auth-Token: bd79166e-9726-4c19-b72b-037984c75561
> 
< HTTP/1.1 401 Unauthorized
< Server: Apache-Coyote/1.1
< Set-Cookie: JSESSIONID=OxTATdDzLz6yyAyYLcuPj4I4.undefined; Path=/todo-server
< Content-Type: application/json;charset=UTF-8
< Content-Length: 100
< Date: Fri, 12 Apr 2013 12:09:07 GMT
< 
* Connection #0 to host localhost left intact
"Not authorizedorg.aerogear.todo.server.exception.HttpSecurityException: User authentication failed"* Closing connection #0
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira