Github user necouchman commented on a diff in the pull request:
https://github.com/apache/incubator-guacamole-client/pull/183#discussion_r141361436
--- Diff:
extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java
---
@@ -83,7 +115,15 @@ 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();
+ Object credObj =
principal.getAttributes().get("credential");
+ if (credObj != null) {
--- End diff --
Let me see what I can figure out. That's essentially what it was before,
and only the username was returned. When this transitioned to also providing a
password I re-arranged things so that it would be a little more
straight-forward to retrieve both the username and the password from the
AttributePrincipal object without having to try to pass a HashMap or something
like that. If you have a direction in mind let me know...otherwise I'll just
take a stab at something and see what I can figure out.
---