AeroGear TODO updates
by Bruno Oliveira
Ahoy-hoy!
Just to give a heads up, I did some changes at our TODO app
- Auth-Token will come from http headers response. For example:
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"}'
< Auth-Token: 93351472-9949-47e8-bc4e-7edfe57a9c52
< Content-Type: application/json
< Transfer-Encoding: chunked
< Date: Thu, 27 Sep 2012 01:14:31 GMT
- Auth-Token must be sent on http headers at each request and will be validated at our servlet filter. If you're curious about it https://github.com/aerogear/TODO/commit/734af2d90fadcf1f99e9766cbf3e1e9a3...
For example:
curl -v -H "Accept: application/json" -H "Content-type: application/json" --header "Auth-Token: bde58803-fc3b-4c9e-b88d-32a9d5d2ce28" -X POST -d '{"title": "test", "style":"mydescription"}' http://localhost:8080/todo-server/projects
- aerogear.js configuration header has changed for the reasons above (Kris let me know if I did something wrong)
- The latest 'stable' tag is 0.0.6.M6
Found an issue? https://issues.jboss.org/browse/AEROGEAR, please.
--
"The measure of a man is what he does with power" - Plato
-
@abstractj
-
Volenti Nihil Difficile
12 years, 3 months
[security] using protected endpoints (after getting the 'token' on login)
by Matthias Wessendorf
Hi Bruno,
playing with the 'picketbox' branch of the TODO app. I have one
question about the security API ...
I am able to do a successful login with 'curl' ==> curl -v -H
"Accept: application/json" -H "Content-type: application/json" -X POST
-d '{"username":"john","password":"123"}'
http://localhost:8080/todo-server/auth/login
Great, my RESPONSE looks like:
{"username":"john","token":"6c9d10c9-c0ec-40bb-8c95-6ca84dbb8fad","roles":["admin"],"logged":"true"}
Now when I want to fetch the projects (from their endpoint), by using
the token (as header) (again with) curl:
curl -v -H "Accept: application/json" --header "token:
6c9d10c9-c0ec-40bb-8c95-6ca84dbb8fad" -X GET
http://localhost:8080/todo-server/projects
As a response I am getting 401 (Unauthorized)
==>
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /todo-server/projects 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
> token: 6c9d10c9-c0ec-40bb-8c95-6ca84dbb8fad
>
< HTTP/1.1 401 Unauthorized
< Server: Apache-Coyote/1.1
< Content-Type: application/json
< Content-Length: 39
< Date: Wed, 26 Sep 2012 11:29:56 GMT
<
* Connection #0 to host localhost left intact
Am I missing something here ?
Greetings,
Matthias
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
12 years, 3 months
Updated wording for the staging site
by Jay Balunas
Hi All,
Trying to work out the new wording for the tagline on the front page of the site. Right now it says "JBoss Focused Resources for Mobile and HTML5".
Couple issues with that.
1) We don't want to lead off with "JBOSS" as the client libraries are really for the native developers (web, hybrid, native(ios, android)). The server impl should not be first word.
2) It is not very descriptive about what or why developers would want to use AeroGear.
A few points:
* Libs are "your way" so maybe something something like "Access to secure persistence the way you expect it".
* There is more to come. So if we can work in some wording or impression that this is just the beginning...
* Not just JBoss AS as the backend, but cloud based with openshift, and even using ruby
* Cordova and hybrid should be mentioned - its an important part of our eventual plans, and it not in the graphic
* HTML5 is important, but could almost be assumed when talking about mobile web
* our libs are handling the plumbing, making it easier to develop
Any idea's out there for a good way to put this together for a tag line? I'll think on it more and post some ideas too...
-Jay
12 years, 3 months