necouchman commented on code in PR #1075:
URL: https://github.com/apache/guacamole-client/pull/1075#discussion_r2041277576


##########
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Credentials.java:
##########
@@ -50,65 +49,61 @@ public class Credentials implements Serializable {
     private String password;
 
     /**
-     * The address of the client end of the connection which provided these
-     * credentials, if known.
-     */
-    private String remoteAddress;
-
-    /**
-     * The hostname or, if the hostname cannot be determined, the address of
-     * the client end of the connection which provided these credentials, if
-     * known.
+     * The details of the HTTP request that provided these Credentials.
      */
-    private String remoteHostname;
+    private transient RequestDetails requestDetails;
 
     /**
      * The HttpServletRequest carrying additional credentials, if any.
      */
     private transient HttpServletRequest request;
 
     /**
-     * The HttpSession carrying additional credentials, if any.
+     * Creates a new Credentials object with the given username, password,
+     * and HTTP request. The details of the request are copied for later
+     * reference and can be retrieved with {@link #getRequestDetails()}.
+     *
+     * @param username
+     *     The username that was provided for authentication.
+     *
+     * @param password
+     *     The password that was provided for authentication.
+     *
+     * @param request
+     *     The HTTP request associated with the authentication
+     *     request.
      */
-    private transient HttpSession session;
+    public Credentials(String username, String password, HttpServletRequest 
request) {
+        this(username, password, new RequestDetails(request));
+        this.request = request;
+    }

Review Comment:
   Ah! Flew right over that line. Sorry about that!



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to