necouchman commented on code in PR #973:
URL: https://github.com/apache/guacamole-client/pull/973#discussion_r1573096457
##########
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Credentials.java:
##########
@@ -98,20 +104,43 @@ public class Credentials implements Serializable {
* The HTTP request associated with the authentication
* request.
*/
- public Credentials(String username, String password, HttpServletRequest
request) {
+ public Credentials(String username, String password,
+ HttpServletRequest request) {
this.username = username;
this.password = password;
this.request = request;
+ this.authenticationResumed = false;
+
+ if (request != null) {
+ // Set the remote address
+ this.remoteAddress = request.getRemoteAddr();
- // Set the remote address
- this.remoteAddress = request.getRemoteAddr();
+ // Get the remote hostname
+ this.remoteHostname = request.getRemoteHost();
- // Get the remote hostname
- this.remoteHostname = request.getRemoteHost();
+ // If session exists get it, but don't create a new one.
+ this.session = request.getSession(false);
+ }
- // If session exists get it, but don't create a new one.
- this.session = request.getSession(false);
+ }
+
+ /**
+ * Checks if the current authentication process is a resumed one.
+ *
+ * @return True if authentication is resumed, otherwise false.
+ */
+ public Boolean isAuthenticationResumed() {
Review Comment:
I would agree that the SSO extension migration should be with this ticket -
either this PR, or another PR to follow quickly after this one...
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]