<div>
                    I'll try to reproduce that error today guys to see what happens between the TODO app and curl.
                </div><div><br></div>
                <div><div><br></div><div><br></div><div><div>--&nbsp;</div><div>"The measure of a man is what he does with power" - Plato</div><div>-</div><div>@abstractj</div><div>-</div><div>Volenti Nihil Difficile</div></div></div>
                 
                <p style="color: #A0A0A8;">On Wednesday, September 26, 2012 at 9:42 AM, Kris Borchers wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><div>I see the same thing via curl but it works in browser. My guess would be it has something to do with everything being session based and the session isn't properly maintained with curl. That's mostly just a guess though.</div><div><br></div><div>On Sep 26, 2012, at 7:35 AM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org">matzew@apache.org</a>&gt; wrote:</div><div><br></div><blockquote type="cite"><div><div>Hi Bruno,</div><div><br></div><div>playing with the 'picketbox' branch of the TODO app. I have one</div><div>question about the security API ...</div><div><br></div><div>I am able to do a successful login with 'curl' ==&gt;  curl -v -H</div><div>"Accept: application/json" -H "Content-type: application/json" -X POST</div><div>-d '{"username":"john","password":"123"}'</div><div><a href="http://localhost:8080/todo-server/auth/login">http://localhost:8080/todo-server/auth/login</a></div><div><br></div><div>Great, my RESPONSE looks like:</div><div>{"username":"john","token":"6c9d10c9-c0ec-40bb-8c95-6ca84dbb8fad","roles":["admin"],"logged":"true"}</div><div><br></div><div><br></div><div>Now when I want to fetch the projects (from their endpoint), by using</div><div>the token (as header) (again with) curl:</div><div><br></div><div>curl -v -H "Accept: application/json" --header "token:</div><div>6c9d10c9-c0ec-40bb-8c95-6ca84dbb8fad" -X GET</div><div><a href="http://localhost:8080/todo-server/projects">http://localhost:8080/todo-server/projects</a></div><div><br></div><div>As a response I am getting 401 (Unauthorized)</div><div><br></div><div>==&gt;</div><div><br></div><div><br></div><div>* About to connect() to localhost port 8080 (#0)</div><div>*   Trying 127.0.0.1...</div><div>* connected</div><div>* Connected to localhost (127.0.0.1) port 8080 (#0)</div><blockquote type="cite"><div><div>GET /todo-server/projects HTTP/1.1</div><div>User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5</div><div>Host: localhost:8080</div><div>Accept: application/json</div><div>token: 6c9d10c9-c0ec-40bb-8c95-6ca84dbb8fad</div></div></blockquote><div>&lt; HTTP/1.1 401 Unauthorized</div><div>&lt; Server: Apache-Coyote/1.1</div><div>&lt; Content-Type: application/json</div><div>&lt; Content-Length: 39</div><div>&lt; Date: Wed, 26 Sep 2012 11:29:56 GMT</div><div>&lt;</div><div>* Connection #0 to host localhost left intact</div><div><br></div><div><br></div><div>Am I missing something here ?</div><div><br></div><div><br></div><div>Greetings,</div><div>Matthias</div><div><br></div><div>-- </div><div>Matthias Wessendorf</div><div><br></div><div>blog: <a href="http://matthiaswessendorf.wordpress.com">http://matthiaswessendorf.wordpress.com</a>/</div><div>sessions: <a href="http://www.slideshare.net/mwessendorf">http://www.slideshare.net/mwessendorf</a></div><div>twitter: <a href="http://twitter.com/mwessendorf">http://twitter.com/mwessendorf</a></div><div>_______________________________________________</div><div>aerogear-dev mailing list</div><div><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a></div><div><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></div></div></blockquote><div><br></div><div><br></div><div>_______________________________________________</div><div>aerogear-dev mailing list</div><div><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a></div><div><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>