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

CAS server encoding #35

@lchanouha

Description

@lchanouha

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions