necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460170
##########
File path:
extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java
##########
@@ -65,25 +66,26 @@
* The credentials to use for authentication.
*
* @return
- * An AuthenticatedUser representing the user authenticated by the
+ * A CASAuthenticatedUser representing the user authenticated by the
* given credentials.
*
* @throws GuacamoleException
* If an error occurs while authenticating the user, or if access is
* denied.
*/
- public AuthenticatedUser authenticateUser(Credentials credentials)
+ public CASAuthenticatedUser authenticateUser(Credentials credentials)
throws GuacamoleException {
// Pull CAS ticket from request if present
HttpServletRequest request = credentials.getRequest();
if (request != null) {
String ticket =
request.getParameter(CASTicketField.PARAMETER_NAME);
if (ticket != null) {
- String username = ticketService.validateTicket(ticket,
credentials);
+ Map<String, String> tokens =
ticketService.validateTicket(ticket, credentials);
+ String username = credentials.getUsername();
Review comment:
Yeah, that's a good point. I added an exception into the `validateTicket()`
method for `null` `username`s - let me know if that seems like an okay route?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services