Skip to content

Wire UpstreamTokenService and rewrite swap middleware #3917

Closed

Description

@jhrozek

Summary

Connect the UpstreamTokenService to the middleware and simplify the swap logic.

What

  • EmbeddedAuthServer constructs the service and exposes it via UpstreamTokenService() accessor
  • MiddlewareRunner interface changes from GetUpstreamTokenStorage() to GetUpstreamTokenService()
  • Middleware rewritten: replace direct storage access + manual expiry check with a single GetValidTokens() call + error-to-HTTP mapping

Why

Completes the upstream token refresh feature. The middleware becomes a thin layer that gets a valid credential or maps an error to the appropriate HTTP status.

Activity

  1. added
    enhancement
    size/M
    on Feb 20, 2026
  2. self-assigned this
    on Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

authenticationenhancementproxysize/M

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions