Hi @Matthias,
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
--
Jose Miguel Gallas Olmedo
Associate QE at Mobile Team, Red Hat +34 618 488 633