Problem/Motivation

TokenHandler currently listens to the Kernel Request event directly, and weights itself to execute in relation to AuthenticationManager.

The AuthenticationManager iterates through the available providers and returns the first that applies to the current request. PL needs to be weighted before Cookie so that it can act when a cookie is provided for an expired session, but defer to Cookie for valid sessions.

Steps to reproduce

Proposed resolution

Implement AuthenticationProviderInterface, and update the service definition.

Remaining tasks

User interface changes

API changes

  • TokenHandler no longer defers to user_login_finalize().
    • The user's last login timestamp is not updated when a token is consumed, and user_login hooks are not invoked.
    • A log message is sent to the user channel indicating a persistent login token was used.

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gapple created an issue. See original summary.

gapple’s picture

Issue summary: View changes

Weighting PL to execute after Cookie will reintroduce the issue from #3349484: PL token won't start new session if old session expired from DB, so it needs to come first but have a more extensive applies() check to defer to Cookie when necessary

gapple’s picture

Version: 8.x-1.x-dev » 2.x-dev

Bumping to 2.x since this will change the behaviour when a token is used.

gapple’s picture

Issue summary: View changes

  • gapple committed 1642db43 on 2.x
    Issue #3349762: Change Request event to AuthenticationProvider
    
gapple’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.