AXIAM PHP SDK

RefreshMiddleware.php

Table of Contents

Classes

RefreshMiddleware
`HandlerStack` middleware: on a `401` response, triggers the session's single-flight refresh (CONTRACT.md §9, D-06, SC#2) and retries the ORIGINAL request exactly once via the inner `$handler` — never a loop. All concurrent 401-triggering requests on one {@see Session} share the SAME refresh `PromiseInterface` ({@see Session::refreshIfNeeded()}), so N concurrent expired-token requests still result in exactly one `/api/v1/auth/refresh` call.
On this page

Search results