Github user necouchman commented on a diff in the pull request:
https://github.com/apache/incubator-guacamole-client/pull/183#discussion_r134763447
--- Diff:
extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java
---
@@ -83,7 +106,16 @@ public AuthenticatedUser authenticateUser(Credentials
credentials)
String ticket =
request.getParameter(CASTicketField.PARAMETER_NAME);
if (ticket != null) {
AuthenticatedUser authenticatedUser =
authenticatedUserProvider.get();
-
authenticatedUser.init(ticketService.processUsername(ticket), credentials);
+ AttributePrincipal principal =
ticketService.validateTicket(ticket);
+ String username = principal.getName();
+ credentials.setUsername(username);
+ Object credObj =
principal.getAttributes().get("credential");
+ if (credObj != null) {
+ String clearPass = decryptPassword(credObj.toString());
--- End diff --
The getAttributes call returns a Map<String, Object>, so I think this
conversion is the only (safe) way to get this object into the string format
needed for the decryption process.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---