From 917a4e3535df71fc0726e398349ae1c74e755574 Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Fri, 25 Sep 2020 17:01:51 +0200 Subject: [PATCH] optional to users --- .../src/main/java/com/plannaplan/security/CasValidator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/restservice/src/main/java/com/plannaplan/security/CasValidator.java b/restservice/src/main/java/com/plannaplan/security/CasValidator.java index 9813758..5ad718c 100755 --- a/restservice/src/main/java/com/plannaplan/security/CasValidator.java +++ b/restservice/src/main/java/com/plannaplan/security/CasValidator.java @@ -20,7 +20,7 @@ public class CasValidator { this.ticket = ticket; } - public String validate() throws Exception, CasValidationExcepiton{ + public String validate() throws Exception, CasValidationExcepiton { HttpGet request = new HttpGet(CasValidator.CAS_URL + "/validate?service=" + URLEncoder.encode(this.service, "UTF-8") + "&ticket=" + URLEncoder.encode(this.ticket, "UTF-8")); try (CloseableHttpResponse response = httpClient.execute(request)) { @@ -31,7 +31,7 @@ public class CasValidator { if (entity != null) { // return it as a String result = EntityUtils.toString(entity); - if(result.replace("\n", "").trim().equals("no")){ + if (result.replace("\n", "").trim().equals("no")) { throw new CasValidationExcepiton("Validation failed"); } }