Absolutely.. not :( Darn! I missed the very first line where it says to create the user!

Thanks!

On 24 January 2017 at 16:10, Sebastien Blanc <scm.blanc@gmail.com> wrote:
Hi,
Have you followed the instructions from the readme and created an ups-client client in keycloak https://github.com/aerogear/aerogear-unifiedpush-server/tree/master/node.js

Sebi


On Tue, Jan 24, 2017 at 4:05 PM, Jose Miguel Gallas Olmedo <jgallaso@redhat.com> wrote:
Hi @Matthias,

I am trying to use this nodeJS program here https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/node.js/directgranttest.js but it doesn't work. I've used the correct username and password and client_id is ups-client.

This is the output in the console:

$ node directgranttest.js
receiving data
undefined
receiving data
<html><head><title>JBWEB000065: HTTP Status 401 - </title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 401 - </h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u></u></p><p><b>JBWEB000069: description</b> <u>JBWEB000121: This request requires HTTP authentication.</u></p><HR size="1" noshade="noshade"></body></html>

And I think the problem is when trying to get the bearer token that it's getting this response:

HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
Content-Type: application/json
Date: Tue, 24 Jan 2017 14:54:15 GMT
Connection: close

{"error_description":"Could not find client","error":"invalid_client"}

Lastly this is the http request (intercepted by Wireshark):

POST /auth/realms/aerogear/tokens/grants/access HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: localhost:8080
Connection: close
Transfer-Encoding: chunked

30
username=admin&password=123&client_id=ups-client
0

​Any clue?

Cheers,​

--
Jose Miguel Gallas Olmedo
Associate QE at Mobile Team, Red Hat

_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Jose Miguel Gallas Olmedo
Associate QE at Mobile Team, Red Hat
+34 618 488 633