aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java')
-rw-r--r--id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java
index 9d78418cd..985e1d1c5 100644
--- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java
+++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java
@@ -83,14 +83,14 @@ class OAuth20TokenAction implements IAction {
// create response
JsonObject jsonObject = new JsonObject();
OAuth20Util.addProperytiesToJsonObject(jsonObject, auth20SessionObject.getAuthDataSession());
- String jsonResponse = jsonObject.toString();
- Logger.debug("JSON Response: " + jsonResponse);
+ byte[] jsonResponse = jsonObject.toString().getBytes("UTF-8");
+ Logger.debug("JSON Response: " + new String(jsonResponse));
// write respone to http response
httpResp.setContentType("application/json");
- httpResp.setStatus(HttpServletResponse.SC_OK);
- httpResp.getOutputStream().print(jsonResponse);
- httpResp.getOutputStream().close();
+ httpResp.setContentLength(jsonResponse.length);
+ httpResp.setStatus(HttpServletResponse.SC_OK);
+ httpResp.getOutputStream().write(jsonResponse);
return null;
}