Skip to content

Conversation

@justin-layerv
Copy link
Contributor

Summary

Extract common authentication logic from authWithAspPlugin and legacyAuthWithAspPlugin into a shared doAuthWithPlugin method.

Changes

  • Create doAuthWithPlugin() with the common implementation
  • Simplify authWithAspPlugin() and legacyAuthWithAspPlugin() to delegate to the shared method
  • Improve error logging by including aspId in the error message
  • Remove unused error variable assignment

Before

Two nearly identical 20-line functions with copy-pasted logic.

After

One 18-line implementation with two 1-line wrapper functions.

Test Plan

  • Server package builds successfully
  • Maintains backward compatibility (both public methods still exist)

@justin-layerv justin-layerv self-assigned this Jan 4, 2026
@justin-layerv justin-layerv force-pushed the refactor/dedupe-http-auth-handlers branch from 60f86e7 to 22ff81d Compare January 4, 2026 17:07
Extract common authentication logic from authWithAspPlugin and
legacyAuthWithAspPlugin into a shared doAuthWithPlugin method.

Both public methods now delegate to the common implementation,
eliminating ~20 lines of duplicate code while maintaining
backward compatibility.

Also improves error logging by including the aspId in the error message.
@justin-layerv justin-layerv force-pushed the refactor/dedupe-http-auth-handlers branch from 22ff81d to a8c5a6b Compare January 4, 2026 17:09
@craftleon craftleon merged commit 1bbece7 into main Jan 7, 2026
11 checks passed
@craftleon craftleon deleted the refactor/dedupe-http-auth-handlers branch January 7, 2026 08:11
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.

3 participants