Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logout idle user automatically when HTTP session expires #6380

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

solth
Copy link
Member

@solth solth commented Jan 24, 2025

This pull request restores the correct handling of HTTP sessions being destroyed and thus fixes #6372 .

Expired HTTP sessions were previously handled by the KitodoVersionListener, which was the wrong place for this particular event handling and was then supposed to be moved to SessionService by #6047, but that pull request was missing a required annotation and therefore broke the handling of expired sessions.

#6379 adds the missing annotation to SessionService, but a service class is the wrong place for this in my opinion, so I opted to add a dedicated CustomHttpSessionListener that extends HttpSessionListener and does this job instead.

This pull request also adds a message shortly before the user is logged out automatically, to inform him about the pending, automatic logout, that contains a timer with the remaining time until the automatic logout:

Bildschirmfoto 2025-01-24 um 13 25 56

This makes use of the PrimeFaces IdleMonitor component and the Timer component of PrimeFaces Extensions.

By also clearing the metadata locks of processes opened by a user in the metadata editor upon automatic logout, this pull request resolves #4480 as well.

@solth solth requested a review from matthias-ronge January 24, 2025 12:32
@solth solth changed the title Logout idle user automatically Logout idle user automatically when HTTP session expires Jan 24, 2025
@solth solth modified the milestone: Kitodo.Production 3.8.1 Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handling of expired sessions bugged Metadata editor does not notice logout
1 participant