Skip to content

Symfony Migration for Tokens#2226

Open
connersaeli wants to merge 88 commits into
ubccr:symfony_migrationfrom
connersaeli:symfony_migration-Tokens
Open

Symfony Migration for Tokens#2226
connersaeli wants to merge 88 commits into
ubccr:symfony_migrationfrom
connersaeli:symfony_migration-Tokens

Conversation

@connersaeli

Copy link
Copy Markdown
Contributor

Description

These changes redo many of the changes made in #2054 and the JupyterHub updates that were not merged into symfony_migration. Some relevant changes:

  • Removed duplicate code from authenticateToken() in Tokens and BaseController that both extracted the raw token from the header.
  • Removed a function that was commented out
  • Removed HEADER_KEY and BEARER from Tokens (removed in Restore Data Analytics Framework token authentication via GET/POST params. #2054)
  • Simplified logic checks for tokens. For example $request->headers->get() returns null if it is not present. There's no need here to check if it's null then get() only if it is present.
  • Removed getTokenFromHeader() method because it is only used in one place now. This method is an artifact of having the different Silex/html controllers and needing this code in two different places. This method can just be replaced with a ternary operator.

Motivation and Context

https://github.com/ubccr/xdmod-xsede/issues/1171

Tests performed

Tested on my port of symfony-dev

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@connersaeli connersaeli added this to the 11.5.0 milestone May 18, 2026
@connersaeli connersaeli force-pushed the symfony_migration-Tokens branch from 62315d6 to ea7a002 Compare May 19, 2026 13:35
@connersaeli connersaeli reopened this May 19, 2026

@ryanrath ryanrath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one question really.

Comment thread src/Security/Helpers/Tokens.php Outdated
@connersaeli connersaeli force-pushed the symfony_migration-Tokens branch from 542e3ff to 1ba8914 Compare May 21, 2026 14:21
Comment thread src/Controller/InternalDashboard/InternalDashboardController.php Outdated
Comment thread src/Controller/InternalDashboard/SABUserController.php Outdated
Comment thread src/Controller/BaseController.php Outdated
@connersaeli connersaeli force-pushed the symfony_migration-Tokens branch from 3d2b6dd to 45ed551 Compare May 28, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants