mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-393: Add session invalidation hooks to AuthenticatedUser.
This commit is contained in:
@@ -136,4 +136,9 @@ public abstract class RemoteAuthenticatedUser implements AuthenticatedUser {
|
||||
return authenticationProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
// Nothing to invalidate
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -29,4 +29,9 @@ public abstract class AbstractAuthenticatedUser extends AbstractIdentifiable
|
||||
|
||||
// Prior functionality now resides within AbstractIdentifiable
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
// Nothing to invalidate
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -49,4 +49,11 @@ public interface AuthenticatedUser extends Identifiable {
|
||||
*/
|
||||
Credentials getCredentials();
|
||||
|
||||
/**
|
||||
* Invalidates this authenticated user and their associated token such that
|
||||
* they are no longer logged in. This function will be automatically
|
||||
* invoked when the user logs out, or when their session expires.
|
||||
*/
|
||||
void invalidate();
|
||||
|
||||
}
|
||||
|
@@ -252,6 +252,9 @@ public class GuacamoleSession {
|
||||
}
|
||||
}
|
||||
|
||||
// Invalidate the authenticated user object
|
||||
authenticatedUser.invalidate();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user