mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1723: Simplify active window check; do not refresh from DB during active sessions.
This commit is contained in:
@@ -162,4 +162,9 @@ public class DelegatingUserContext implements UserContext {
|
||||
return userContext.getPrivileged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return userContext.isValid();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -40,6 +40,27 @@ public interface UserContext {
|
||||
*/
|
||||
User self();
|
||||
|
||||
/**
|
||||
* Returns true if the session for the User associated with this user
|
||||
* context is valid, or false otherwise. If the session is not valid,
|
||||
* the webapp can be expected to terminate the session within a short
|
||||
* period of time.
|
||||
*
|
||||
* NOTE: The webapp currently checks once a minute, and terminates any
|
||||
* session marked as invalid.
|
||||
*
|
||||
* @return
|
||||
* true if the session for the User associated with this user
|
||||
* context is valid, or false otherwise.
|
||||
*/
|
||||
default boolean isValid() {
|
||||
|
||||
// A user context is always valid unless explicitly updated by an
|
||||
// implementation
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an arbitrary REST resource representing this UserContext. The
|
||||
* REST resource returned must be properly annotated with JSR-311
|
||||
|
Reference in New Issue
Block a user