diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2020-10-13 16:31:03 +0200 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2020-10-13 16:31:03 +0200 |
commit | 54fdf1c8201312ffedec71595aa6602bb11e7640 (patch) | |
tree | 66fbf26805f04b3d4495365a6dc66abbea2fe285 /eaaf_modules/eaaf_module_auth_sl20/src/main | |
parent | 379cd870ec5a3e6d66825d75a37e091e4e181074 (diff) | |
download | EAAF-Components-54fdf1c8201312ffedec71595aa6602bb11e7640.tar.gz EAAF-Components-54fdf1c8201312ffedec71595aa6602bb11e7640.tar.bz2 EAAF-Components-54fdf1c8201312ffedec71595aa6602bb11e7640.zip |
Serialize exceptions in error-handler manually to fix problems with Serialization in some caching frameworks
Diffstat (limited to 'eaaf_modules/eaaf_module_auth_sl20/src/main')
-rw-r--r-- | eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java index 5be5a61f..56084d94 100644 --- a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java +++ b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java @@ -2,6 +2,7 @@ package at.gv.egiz.eaaf.modules.auth.sl20.tasks; import java.io.Serializable; import java.net.ConnectException; +import java.nio.charset.StandardCharsets; import java.security.cert.CertificateEncodingException; import java.util.ArrayList; import java.util.List; @@ -98,23 +99,18 @@ public abstract class AbstractCreateQualEidRequestTask extends AbstractAuthServl final HttpPost httpReq = new HttpPost(new URIBuilder(vdaQualEidDUrl).build()); final List<NameValuePair> parameters = new ArrayList<>(); parameters.add(new BasicNameValuePair(SL20Constants.PARAM_SL20_REQ_COMMAND_PARAM, - Base64Url.encode(sl20Req.toString().getBytes("UTF-8")))); + Base64Url.encode(sl20Req.toString().getBytes(StandardCharsets.UTF_8)))); //inject additional request parameters injectAdditionalSL20RequestParams(parameters, executionContext, request); httpReq.setEntity(new UrlEncodedFormEntity(parameters)); - // build http GET request - // URIBuilder sl20ReqUri = new URIBuilder(vdaQualeIDUrl); - // sl20ReqUri.addParameter(SL20Constants.PARAM_SL20_REQ_COMMAND_PARAM, - // Base64Url.encode(sl20Req.toString().getBytes())); - // HttpGet httpReq = new HttpGet(sl20ReqUri.build()); - // set native client header httpReq.addHeader(SL20Constants.HTTP_HEADER_SL20_CLIENT_TYPE, SL20Constants.HTTP_HEADER_VALUE_NATIVE); - log.trace("Request VDA via SL20 with: " + Base64Url.encode(sl20Req.toString().getBytes("UTF-8"))); + log.trace("Request VDA via SL20 with: {}", + Base64Url.encode(sl20Req.toString().getBytes(StandardCharsets.UTF_8))); // request VDA final HttpResponse httpResp = httpClientFactory.getHttpClient(false).execute(httpReq); |