Skip to content

feat(session): allow apps to renew the session id while keeping the login's token - #65817

Draft
karlitschek wants to merge 1 commit into
masterfrom
feat/renew-session-id
Draft

karlitschek wants to merge 1 commit into
masterfrom
feat/renew-session-id

Conversation

@karlitschek

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

A small core change used by the intrusion_detection app, alongside #65735–#65741. It can be reviewed and merged on its own: a new public OCP\Session\ISessionIdRenewer gives the current session a new id while keeping the same auth token row.

TODO

  • Description by the author
  • Manual test on a live instance

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

AI disclosure: this change was written with Claude Code (claude-opus-5-5) and reviewed by the author; every commit carries an Assisted-by trailer.

🤖 Generated with Claude Code

…ogin's token

Add ISessionIdRenewer. It gives the current session a new id, e.g. after
the user proved their identity once more in this session. Unlike
ISession::regenerateId() with $updateToken, the auth token is not
replaced by a new one: the same token row, with its id, name and stored
password, is moved to the new session id. Anything that refers to the
token by its id, such as the pending second-factor marker or an app's own
records, stays valid. A remember-me cookie that points to the old
session id follows the new one, and the old id no longer finds the
token, also not from the token cache.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants