You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New service package that owns upstream token lifecycle: read, refresh, and error handling.
What
New package pkg/authserver/upstreamtoken/ with:
Service interface — single method GetValidTokens(ctx, sessionID) returning an opaque UpstreamCredential
inProcessService implementation — on-read refresh using the existing upstream.OAuth2Provider.RefreshTokens(), singleflight deduplication, error classification (permanent vs transient), session revocation on permanent upstream failure
Sentinel errors for session not found, refresh failed, no refresh token
Why
The middleware should call a service-level interface, not raw storage. This abstraction represents the business operation and can be exposed over the network when the auth server moves out-of-process.
Activity