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
- static $successCount in CircuitBreaker → private property $successCount, reset properly in reset()
- Raw level string passed to GeocachingHttpLoggerPlugin → normalized in enableHttpLoggingWithLogger() before use
- UPGRADE-4.0.md token refresh section → corrected to distinguish token_storage+reference_code (storage-aware auth) from enableTokenRefresh() (actual 401 auto-refresh)
- UPGRADE-4.0.md reliability examples → updated to use the real configureRetry() / configureFixedRetry() / enableCircuitBreaker() / enableReliability() array API
Copy file name to clipboardExpand all lines: UPGRADE-4.0.md
+60-32Lines changed: 60 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,11 +119,24 @@ The sections below describe what 4.0 adds. Nothing else you already use has been
119
119
120
120
### Automatic token refresh
121
121
122
-
Pass a `TokenStorageInterface` and a `reference_code` (the user's Geocaching reference code, e.g. `'PR12345'`) to `Options` to enable automatic access-token refresh on `401` responses. The SDK will refresh, store the new token, and retry the request transparently.
122
+
Token refresh has two independent layers:
123
+
124
+
**Layer 1 — storage-aware authentication** (`token_storage` + `reference_code` in `Options`):
125
+
Reads the freshest access token from storage on every request so that a token refreshed elsewhere (e.g. another process) is always used. Pass these options to enable it:
126
+
127
+
```php
128
+
$options = new Options([
129
+
'environment' => Environment::PRODUCTION,
130
+
'access_token' => $storedAccessToken,
131
+
'token_storage' => new MyTokenStorage(), // implements TokenStorageInterface
0 commit comments