Rename jpro-auth-routing Filter classes to Transformer; RoutingAuth.filter() -> install()#118
Merged
Merged
Conversation
…() -> install() Aligns jpro-auth-routing with the routing Transformer vocabulary (reversing the 0.7.0 decision to keep the Filter name): AuthBasicFilter/AuthBasicOAuth2Filter/ AuthRestrictionFilter -> *Transformer, AuthUIProvider.createFilter() -> createTransformer(), and RoutingAuth.filter() -> install(). Updates examples, both auth READMEs (parent now points at RoutingAuth), and the CHANGELOG. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aligns
jpro-auth-routingwith the routingTransformervocabulary. In 0.7.0 routing renamed itsFiltertype toTransformerbut the auth classes deliberately keptFilter; with only three of them — and no*Filterconvention anywhere else in routing — that lone exception caused more confusion than it was worth (aFilterand aTransformerare the same type here). This reverses that decision.Naming only — no behavior change.
Renames
AuthBasicFilter→AuthBasicTransformerAuthBasicOAuth2Filter→AuthBasicOAuth2TransformerAuthRestrictionFilter→AuthRestrictionTransformerAuthUIProvider.createFilter()→createTransformer()RoutingAuth.filter()→install()— an intent name, since both it andrequireLogin()return aTransformer(a method calledtransformer()would be ambiguous).install()reads as "wire the login page + callbacks into the app."Also
jpro-auth/README.mdnow points atRoutingAuthas the recommended entry point.0.7.2 (unreleased)section documenting theRoutingAuthfeature (merged in Prototype: RoutingAuth — high-level auth facade for jpro-auth-routing #116, previously unlisted) and this breaking rename.Hard rename (no deprecated aliases) — pre-1.0.
Verified:
:jpro-auth:routingand:jpro-auth:examplecompile; demo runs (-Psample=routing-auth); no leftover*Filter/createFilter/filter()references; README versions in sync.Follow-up (separate PR): unify the
onLogin/onErrorcallbacks across all login methods and de-duplicateRoutingAuth's inline OAuth/basic providers.🤖 Generated with Claude Code