Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

CAS server encoding #35

Open
lchanouha opened this issue Oct 29, 2018 · 0 comments
Open

CAS server encoding #35

lchanouha opened this issue Oct 29, 2018 · 0 comments

Comments

@lchanouha
Copy link

Hi,
My CAS server (custom CASino app) uses UTF-8-encoded attributes.
Shib-Cas module does not set defaut encoding, so i just on method to set it on UTF-8 .

diff --git a/src/main/java/net/unicon/idp/externalauth/ShibcasAuthServlet.java b/src/main/java/net/unicon/idp/externalauth/ShibcasAuthServlet.java
index 4ce5284..696dd79 100644
--- a/src/main/java/net/unicon/idp/externalauth/ShibcasAuthServlet.java
+++ b/src/main/java/net/unicon/idp/externalauth/ShibcasAuthServlet.java
@@ -98,6 +98,7 @@ public class ShibcasAuthServlet extends HttpServlet {
                                            final String authenticationKey, final boolean force) throws ExternalAuthenticationException, IOException {
         try {
             ticketValidator.setRenew(force);
+            ticketValidator.setEncoding("UTF-8");
             final String serviceUrl = constructServiceUrl(request, response, true);
             logger.debug("validating ticket: {} with service url: {}", ticket, serviceUrl);
             final Assertion assertion = ticketValidator.validate(ticket, serviceUrl);


Could parameter to set CAS server encoding (since aperero doesn't support auto-detection bases on xml header) be added, or in 2018 i think we cas set UTF-8 as default encoding.

Sorry for my english,
Regards;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant