summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
diff options
context:
space:
mode:
authorThomas <thomas.lenz@egiz.gv.at>2019-12-05 09:52:48 +0100
committerThomas <thomas.lenz@egiz.gv.at>2019-12-05 09:52:48 +0100
commit3fada6cef21c9b16467177d866df778203b51b4d (patch)
tree8fe8ed37b6ee9fe35a1e035ceba6c68808328415 /eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
parent95b21a826e5d81fdeabcf4673a9e87047edaec9d (diff)
downloadEAAF-Components-3fada6cef21c9b16467177d866df778203b51b4d.tar.gz
EAAF-Components-3fada6cef21c9b16467177d866df778203b51b4d.tar.bz2
EAAF-Components-3fada6cef21c9b16467177d866df778203b51b4d.zip
some code code-style modifications
active code-quality checks!
Diffstat (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java35
1 files changed, 19 insertions, 16 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
index 7b350c3b..51a8aefd 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
@@ -20,15 +20,10 @@
package at.gv.egiz.eaaf.core.impl.idp.controller;
import java.io.IOException;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import at.gv.egiz.components.eventlog.api.EventConstants;
-import at.gv.egiz.eaaf.core.api.IRequest;
-import at.gv.egiz.eaaf.core.api.IRequestStorage;
-import at.gv.egiz.eaaf.core.api.IStatusMessenger;
-import at.gv.egiz.eaaf.core.api.data.EAAFConstants;
-import at.gv.egiz.eaaf.core.api.data.ExceptionContainer;
-import at.gv.egiz.eaaf.core.exceptions.EaafException;
+
import org.apache.commons.text.StringEscapeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -37,6 +32,14 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
+import at.gv.egiz.components.eventlog.api.EventConstants;
+import at.gv.egiz.eaaf.core.api.IRequest;
+import at.gv.egiz.eaaf.core.api.IRequestStorage;
+import at.gv.egiz.eaaf.core.api.IStatusMessenger;
+import at.gv.egiz.eaaf.core.api.data.EaafConstants;
+import at.gv.egiz.eaaf.core.api.data.ExceptionContainer;
+import at.gv.egiz.eaaf.core.exceptions.EaafException;
+
/**
* Protocol finialization end-point.
*
@@ -55,17 +58,17 @@ public class ProtocolFinalizationController extends AbstractController {
/**
* End-Point to handle errors.
*
- * @param req http request
+ * @param req http request
* @param resp http response
* @throws EaafException In case of an internal error
- * @throws IOException In case of a servlet error
+ * @throws IOException In case of a servlet error
*/
- @RequestMapping(value = ENDPOINT_ERRORHANDLING, method = {RequestMethod.GET})
+ @RequestMapping(value = ENDPOINT_ERRORHANDLING, method = { RequestMethod.GET })
public void errorHandling(final HttpServletRequest req, final HttpServletResponse resp)
throws EaafException, IOException {
// receive an authentication error
final String errorid =
- StringEscapeUtils.escapeHtml4(req.getParameter(EAAFConstants.PARAM_HTTP_ERROR_CODE));
+ StringEscapeUtils.escapeHtml4(req.getParameter(EaafConstants.PARAM_HTTP_ERROR_CODE));
if (errorid != null) {
IRequest pendingReq = null;
try {
@@ -127,25 +130,25 @@ public class ProtocolFinalizationController extends AbstractController {
/**
* End-Point to finalize authentication protocol.
*
- * @param req http request
+ * @param req http request
* @param resp http response
* @throws EaafException In case of an internal error
- * @throws IOException In case of a servlet error
+ * @throws IOException In case of a servlet error
*/
- @RequestMapping(value = ENDPOINT_FINALIZEPROTOCOL, method = {RequestMethod.GET})
+ @RequestMapping(value = ENDPOINT_FINALIZEPROTOCOL, method = { RequestMethod.GET })
public void finalizeAuthProtocol(final HttpServletRequest req, final HttpServletResponse resp)
throws EaafException, IOException {
// read pendingRequest from http request
final String pendingRequestID = StringEscapeUtils
- .escapeHtml4(req.getParameter(EAAFConstants.PARAM_HTTP_TARGET_PENDINGREQUESTID));
+ .escapeHtml4(req.getParameter(EaafConstants.PARAM_HTTP_TARGET_PENDINGREQUESTID));
final IRequest pendingReq = requestStorage.getPendingRequest(pendingRequestID);
if (pendingReq == null) {
log.error("No PendingRequest with ID " + pendingRequestID + " found.!");
protAuthService.handleErrorNoRedirect(
new EaafException(IStatusMessenger.CODES_INTERNAL_ERROR_AUTH_TIMEOUT,
- new Object[] {pendingRequestID,}),
+ new Object[] { pendingRequestID, }),
req, resp, false);
} else {