chore: promote auth package from http.auth to top-level auth#198
Merged
Conversation
Move the authentication package up one level, from org.dexpace.sdk.core.http.auth to org.dexpace.sdk.core.auth. The http.* subpackages (request, response, common, context, sse, paging) are HTTP wire models and call mechanics, whereas authentication is a cross-cutting capability: credentials, token providers, RFC 7235 challenge handling, and the per-operation auth descriptor ladder. It belongs alongside pipeline, pagination, serde, and instrumentation rather than under the HTTP models. The auth package has no compile dependency on the HTTP models beyond Method and HttpHeaderName, and the auth-to-http wiring already lives in http.pipeline.steps, so the new location reflects how the code is actually coupled. No behavior change. This is a breaking API change: every auth type's fully-qualified name changes and the committed .api snapshot is regenerated to match, so callers update their imports accordingly. The http.auth.* instrumentation event names are left unchanged; they namespace the HTTP call domain for observability, not the code package layout.
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.
What
Moves the authentication package up one level, from
org.dexpace.sdk.core.http.authtoorg.dexpace.sdk.core.auth. No subpackaging; the auth types stay in one flat package.Why
The
http.*subpackages (request,response,common,context,sse,paging) are HTTP wire models and call mechanics. Authentication is a different kind of thing: a cross-cutting capability covering credentials, token providers, RFC 7235 challenge handling, and the per-operation auth descriptor ladder. It sits more naturally alongside the other top-level capability packages (pipeline,pagination,serde,instrumentation) than under the HTTP models.The dependency structure backs this up:
MethodandHttpHeaderName. It does not referenceRequest,Response, orHeaders.http.pipeline.steps(the*AuthStepclasses).So
http.authwas nested underhttpby topic, not by coupling. The new location reflects how the code is actually wired.Scope
sdk-core(ContextStoreKDoc links, the three*AuthStepsteps,ProxyOptions), the Java test helper, the relevant pipeline-step and proxy tests, plussdk-exampleand both transport test suites.sdk-core.apisnapshot.README.md,CLAUDE.md, anddocs/(architecture, implementation-plan, refs-comparison).Breaking change
The fully-qualified name of every auth type changes (
…http.auth.Xbecomes…auth.X). Callers update their imports accordingly. The.apisnapshot is regenerated to match, soapiCheckpasses.Not changed
The
http.auth.*instrumentation event names (such ashttp.auth.background_refresh_failed) are left as-is. They namespace the HTTP call domain for observability and follow the existinghttp.*event convention (comparehttp.instrumentation.*), independent of the code package layout.Verification
./gradlew buildpasses locally (tests, ktlint, detekt, apiCheck, kover), minus the network-gated:sdk-shrink-test:r8Runstep, which CI runs.