aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-openID
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-12-15 09:50:18 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-12-15 09:50:18 +0100
commit3573f8ea5a4b269834723da4708bf0bace50fa65 (patch)
tree8fb47341f59a7bef99cb0c7370d16db0210b2e95 /id/server/modules/moa-id-module-openID
parent0f4c4e1e8c897d06a4ba4aeea9657e4036ead50d (diff)
parentf03d5eb61c46186cf9d9e5a27f67fd8ac070a296 (diff)
downloadmoa-id-spss-3573f8ea5a4b269834723da4708bf0bace50fa65.tar.gz
moa-id-spss-3573f8ea5a4b269834723da4708bf0bace50fa65.tar.bz2
moa-id-spss-3573f8ea5a4b269834723da4708bf0bace50fa65.zip
Merge branch 'eIDAS_node_implementation' into development_preview
Diffstat (limited to 'id/server/modules/moa-id-module-openID')
-rw-r--r--id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java
index 118c53f6b..75ea41449 100644
--- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java
+++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java
@@ -204,9 +204,11 @@ public class OAuth20Protocol extends AbstractAuthProtocolModulController {
OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR, errorCode);
OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR_DESCRIPTION, errorDescription);
- if (MiscUtil.isNotEmpty(moaError))
- OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR_URI, errorUri + "#" + moaError);
OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_STATE, state);
+ if (MiscUtil.isNotEmpty(moaError))
+ OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR_URI,
+ URLEncoder.encode(errorUri + "#" + moaError, "UTF-8"));
+
response.setContentType("text/html");
response.setStatus(HttpServletResponse.SC_FOUND);
@@ -220,7 +222,8 @@ public class OAuth20Protocol extends AbstractAuthProtocolModulController {
Map<String, Object> params = new HashMap<String, Object>();
params.put(OAuth20Constants.PARAM_ERROR, errorCode);
params.put(OAuth20Constants.PARAM_ERROR_DESCRIPTION, errorDescription);
- params.put(OAuth20Constants.PARAM_ERROR_URI, errorUri + "#" + moaError);
+ params.put(OAuth20Constants.PARAM_ERROR_URI,
+ URLEncoder.encode(errorUri + "#" + moaError, "UTF-8"));
// create response
JsonObject jsonObject = new JsonObject();